User Tools

Site Tools


set_entity_script

This is an old revision of the document!


Set Entity Script


Sets the script of the specified tile or object. An empty string value can be specified for the script name in order to remove the entity's script. The script name is case-sensitive.

set_entity_script(entity, script_name)
ArgumentDescriptionTypeRequired
entityEntity for which to update the script.EntityYes
script_nameName of the new script.StringYes

Example:

set_entity_script(entity["chest01", "empty_chest")

Results: The script for entity “chest01” is removed and replaced with the “empty_chest” script.

Use the Set Entity Script function to change the behavior of an object after it has been interacted with or to remove its script so it can no longer be interacted with, for example a door that the player cannot close once opened.


Editor Node:

Visual Demo:

set_entity_script.1495148005.txt.gz · Last modified: 2017/05/18 15:53 by justin