Difference between revisions of "Ifhitweapon" - EDukeWiki

# Difference between revisions of "Ifhitweapon"

From EDukeWiki

Revision as of 12:48, 4 May 2009 (view source) One (talk | contribs) ← Older edit | Latest revision as of 10:06, 14 August 2011 (view source) TX (talk | contribs)
Line 1: | Line 1:
| '''ifhitweapon''' { do something } else { do something else } |  | '''ifhitweapon''' { do something } else { do something else }
− | Checks if the current [[actor]] was struck by a weapon. This must be called somewhere in an actor in order for it to be effected by projectiles. Also see [[ifwasweapon]]. | + | Checks if the current [[actor]] was struck by a weapon. Built-in damage processing occurs when using '''ifhitweapon''', so it must be called frequently in actor code in order for the actor to be affected by projectiles. Also see [[ifwasweapon]].
| [[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 10:06, 14 August 2011

ifhitweapon { do something } else { do something else }

Checks if the current actor was struck by a weapon. Built-in damage processing occurs when using ifhitweapon, so it must be called frequently in actor code in order for the actor to be affected by projectiles. Also see ifwasweapon.

Retrieved from "http://wiki.eduke32.com/w/index.php?title=Ifhitweapon&oldid=9917"
Categories:

- Duke3D 1.3/1.5 commands
- Sprite manipulation
- If conditions