EVENT KILLIT: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''EVENT_KILLIT''' is a [http://www.eduke32.com/wiki/index.php?title=EDuke32_event_list Game Event].
{{EventTable|1=EVENT_KILLIT|2=closest player to sprite|3=sprite being deleted|4=1 value}}
EVENT_KILLIT is a [[EDuke32_event_list|Game Event]].


This [[event]] is fired when an actor is about to be killed by the [[killit]] command or by the game.
This [[event]] is fired when an actor is about to be deleted by the [[killit]] command, or through other means.  


Set gamevar RETURN 0 to let the actor die.<br>
[[RETURN]] is set to 0 by default. Set it to any non-zero value to prevent the actor from being deleted.
Set gamevar RETURN 1 to let the actor live.<br>
 
Note: by default the game kills actors but it's advisable to set a value to RETURN explicitly before exiting the event. Otherwise the RETURN may be changed during processing the event because some commands change this gamevar.
WARNING: Be carefull when using commands that change the gamevar RETURN (such as [[espawn]]), as you may need to set it back to zero.


[[Category:Events]]
[[Category:Events]]

Latest revision as of 00:56, 5 February 2022

Event ID player# THISACTOR RETURN
EVENT_KILLIT closest player to sprite sprite being deleted 1 value

EVENT_KILLIT is a Game Event.

This event is fired when an actor is about to be deleted by the killit command, or through other means.

RETURN is set to 0 by default. Set it to any non-zero value to prevent the actor from being deleted.

WARNING: Be carefull when using commands that change the gamevar RETURN (such as espawn), as you may need to set it back to zero.