Script:unset: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 8: | Line 8: | ||
The context entity is ignored when modifying global variables. System variables (those starting with ^) cannot be removed. | The context entity is ignored when modifying global variables. System variables (those starting with ^) cannot be removed. | ||
[[Category:Script commands changing variables]] |
Latest revision as of 21:20, 8 July 2022
The unset
script command is used to remove a script variable for an entity. Since there is no way to test if a variable exists, removing a string
variable is effectively equivalent to set <variable> "void"
while removing a number
or int
variable is equivalent to set <variable> 0
. However, unset
will free up space in the save file while set
with a default value will not.
Usage
unset <variable>
Context: Any Entity
Parameters:
Parameter | Type | Description |
---|---|---|
variable |
variable |
Name of the variable to remove |
The context entity is ignored when modifying global variables. System variables (those starting with ^) cannot be removed.