From Arx Libertatis Wiki
Jump to navigation Jump to search

The 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 -f, -i or -n flags are provided
 -z: Send the event to entities inside a zone
 -r: Send the event to nearby entities


group (requires -g) string or variable Name of the group entities have to be in to receive the event
event event Name of the event to send
zone (requires -z) string or variable Name of the zone entities have to be in to receive the event
radius (requires -r) number or variable Maximum distance for entities to receive the event
entity entity or variable ID of the entity to send the event to
parameters string Parameters to add to the event as a single string with spaces separating the parameters

The -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 -f, -i and -n flags is ignored unless combined with -r or -z to send events to nearby entities or those in a zone.