collision

From Arx Libertatis Wiki
Revision as of 16:49, 22 June 2022 by Ds (talk | contribs) (Created page with "{{ScriptCommandPage |description=enable or disable collisions |context=any |parameters= enable bool Enable or disable collisions |intro=With collisions disabled, other entities including the player can move trough this one. For pathfinding, the nodes covered by the entity need to be enabled or disabled separately using {{Command|anchorblock}}. }} == Collision errors == If on re-enabling collisions, the entity overlaps with other entities (that have collisions enabled)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The collision script command is used to enable or disable collisions for an entity. With collisions disabled, other entities including the player can move trough this one. For pathfinding, the nodes covered by the entity need to be enabled or disabled separately using anchorblock.

Usage

collision <enable>

Context: Any Entity

Parameters:

ParameterTypeDescription
enable bool Enable or disable collisions

Collision errors

If on re-enabling collisions, the entity overlaps with other entities (that have collisions enabled) then, for each colliding entity, the collision_error_detail event is sent asynchronously to the calling entity with the colliding entity as the sender, followed by a single collision_error event. Asynchronous here means that the script for these events won't execute until some time after the current event completes, not during the collision call.