setevent
Jump to navigation
Jump to search
The setevent
script command is used to enable or disable an event for an entity. Disabled events are always refused without actually executing any scripts.
Mega-hidden entities can always only receive the reload
event while dead NPCs can only receive the die
, dead
, executeline
, reload
, inventory2_open
and inventory2_close
events. setevent
cannot be used to relax those restrictions.
Usage
setevent <event> <enable>
Context: Any Entity
Parameters:
Parameter | Type | Description |
---|---|---|
event |
event |
The event to disable or enable |
enable |
bool |
Allow this event to be sent to current entity |
event
must be one of the following:
aggression
chat
collide_npc
cursormode
detectplayer
(also disablesundetectplayer
)explorationmode
hear
hit
inventory2_open
main
undetectplayer
(also disablesdetectplayer
)