Script:destroy: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 9: Line 9:
entity entity The entity to destroy.
entity entity The entity to destroy.
spell spell The spell to destroy. (Added in {{Changelog|1.3}})
spell spell The spell to destroy. (Added in {{Changelog|1.3}})
|intro=The entity or spell will be marked for deletion. It will not be deleted until the end of the frame, but all further script events will be blocked and the entity is hidden immediately.  If the given entity is also the calling entity, the script execution ends after this command.
|intro=For [[:Category:Items|item]] [[Script:playerstacksize|stacks]], this command reduces the [[Script:setcount|number of items]] in the stack by 1 and only destroys the stack if the count reaches 0. Other entities are always destroyed. The entity or spell will be marked for deletion. It will not be deleted until the end of the frame, but all further script events will be blocked and the entity is hidden immediately.  If the given entity is also the calling entity, the script execution ends after this command.
}}
}}


[[Category:Script control flow]]
[[Category:Script control flow]]
[[Category:Script commands destroying entities]]
[[Category:Script commands destroying entities]]

Latest revision as of 18:33, 21 June 2022

The destroy script command is used to destroy an entity or spell. For item stacks, this command reduces the number of items in the stack by 1 and only destroys the stack if the count reaches 0. Other entities are always destroyed. The entity or spell will be marked for deletion. It will not be deleted until the end of the frame, but all further script events will be blocked and the entity is hidden immediately. If the given entity is also the calling entity, the script execution ends after this command.

Usage

destroy <entity>
destroy <spell>

Context: For self

Parameters:

ParameterTypeDescription
entity entity The entity to destroy.
spell spell The spell to destroy. (Added in Arx Libertatis 1.3)