This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
set_entity_script [2020/04/28 10:16] – justin | set_entity_script [2022/05/07 14:24] (current) – justin | ||
---|---|---|---|
Line 6: | Line 6: | ||
====Signature: | ====Signature: | ||
<code python> | <code python> | ||
- | set_entity_script(entity, | + | set_entity_script(entity, |
</ | </ | ||
Line 12: | Line 12: | ||
|entity|[[Entity]] to update the [[script]] for.|[[Entity]]|Yes| | |entity|[[Entity]] to update the [[script]] for.|[[Entity]]|Yes| | ||
|script_name|Name of the new [[script]].|[[String]]|Yes| | |script_name|Name of the new [[script]].|[[String]]|Yes| | ||
- | |trigger_type|When to trigger the [[script]] | + | |trigger_type|When to trigger the [[script]]. This argument is only applicable to [[tile|tiles]] |
+ | |triggerable_by_npc|Determines whether or not [[npc|NPCs]] can trigger the [[script]].|[[Boolean]]|No| | ||
====Example: | ====Example: | ||
<code bauxite> | <code bauxite> | ||
- | set_entity_script(entity[" | + | set_entity_script(entity[" |
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | 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. | + | 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. |
</ | </ | ||