Ifspawnedby: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
ifspawnedby <actor> { do something } else { do something else }
ifspawnedby <actor> { do something } else { do something else }


[[If condition]] returning true if the current [[actor]] was spawned by <actor>. If the actor wasn't spawned by any actor and was loaded by the map, the value takes his own tile number.
[[If condition]] returning true if the current [[actor]] was spawned by <actor>. If the actor wasn't spawned by any actor and was loaded by the map, the value takes his own tile number.  This check no longer works properly after an actor has taken damage as the same memory location is reused to hold the tile number of whatever caused the damage.  Therefore, this command is identical to [[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]]

Revision as of 14:22, 8 August 2008

ifspawnedby <actor> { do something } else { do something else }

If condition returning true if the current actor was spawned by <actor>. If the actor wasn't spawned by any actor and was loaded by the map, the value takes his own tile number. This check no longer works properly after an actor has taken damage as the same memory location is reused to hold the tile number of whatever caused the damage. Therefore, this command is identical to ifwasweapon.