Vm sprite: Difference between revisions
Jump to navigation
Jump to search
TrooperDan (talk | contribs) Created page with "The ID of the current sprite, which "THISACTOR" returns. Changing this value is useful because some commands only affect the current sprite, such as "insertspriteq", "killit",..." |
No edit summary |
||
Line 1: | Line 1: | ||
This is used to determine the ID of the current sprite. This is identical to "THISACTOR" in most cases (however "THISACTOR" is read-only). | |||
Changing this value is useful for commands that only affect the current sprite, which is true for all commands in the original CON v1.5. | |||
It can also be used for when making a loop through all sprites. Example: | |||
appendevent EVENT_WORLD | |||
for My_Sprite allsprites | |||
{ | |||
setuserdef[].vm_sprite My_Sprite | |||
[...] | |||
} | |||
endevent | |||
See also [[vm_player]] and [[vm_distance]]. | |||
[[Category:Userdef structure members]] |
Revision as of 04:51, 19 February 2020
This is used to determine the ID of the current sprite. This is identical to "THISACTOR" in most cases (however "THISACTOR" is read-only).
Changing this value is useful for commands that only affect the current sprite, which is true for all commands in the original CON v1.5.
It can also be used for when making a loop through all sprites. Example:
appendevent EVENT_WORLD for My_Sprite allsprites { setuserdef[].vm_sprite My_Sprite [...] } endevent
See also vm_player and vm_distance.