sendevent script command is used to send an event asynchronously to one or more entities for an entity. Events can either be sent to a single entity, to all entities of a group, to all nearby items, NPCs and/or props (optionally limited to those also in a group), or to all items, NPCs and/or props inside a zone (optionally limited to those also in a group).
Events are ignored by entities that are mega-hidden using
objecthide -m on.
sendevent <event> <entity*> <parameters>
sendevent -z[gfin] [g?group*] <event> <zone*> <parameters>
sendevent -r[gfin] [g?group*] <event> <radius*> <parameters>
sendevent -g <group*> <event> <parameters>
Context: Any Entity
-g: Send the event only to entities of a group
-f: Send the event to props
-i: Send the event to items
-n: Send the event to NPCs - this is the default if none of the
-n flags are provided
-z: Send the event to entities inside a zone
-r: Send the event to nearby entities
||Name of the group entities have to be in to receive the event|
||Name of the event to send|
||Name of the zone entities have to be in to receive the event|
||Maximum distance for entities to receive the event|
||ID of the entity to send the event to|
||Parameters to add to the event as a single string with spaces separating the parameters|
-z (zone) and
-r (radius) flags cannot be combined but they both can be combined with
-g to additional limit the entities to a group.
The entity type specified using the
-n flags is ignored unless combined with
-z to send events to nearby entities or those in a zone.