Vm sprite: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
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).
This is used to determine the ID of the current sprite. This is what "THISACTOR" returns when using [[setactor]], etc.


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.
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.

Latest revision as of 04:55, 19 February 2020

This is used to determine the ID of the current sprite. This is what "THISACTOR" returns when using setactor, etc.

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.