Ifsquished: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
Removed misinformation and added actually useful info. SQUISHABLEDISTANCE is used in GAME.CON for the player to crush shrunk enemies and has nothing to do with this conditional.
 
Line 1: Line 1:
'''ifsquished''' { do something } else { do something else }
'''ifsquished''' { do something } else { do something else }


Checks if the current [[actor]] is in a sector where the distance between the ceiling and floor is equal to or less than SQUISHABLEDISTANCE, which is [[define]]d in USER.CON.
Checks if the current [[actor]] is in a sector where the distance between the ceiling and floor is below a hardcoded threshold.
 
Note that this conditional check is hardcoded to display quote #10 ("Squish!") if it returns true, even if no actor has actually been killed.


[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Sprite manipulation]]
[[Category:Sprite manipulation]]
[[Category:If conditions]]
[[Category:If conditions]]

Latest revision as of 12:02, 22 August 2020

ifsquished { do something } else { do something else }

Checks if the current actor is in a sector where the distance between the ceiling and floor is below a hardcoded threshold.

Note that this conditional check is hardcoded to display quote #10 ("Squish!") if it returns true, even if no actor has actually been killed.