Vm sprite

From EDukeWiki
Revision as of 04:51, 19 February 2020 by Fox (talk | contribs)
Jump to navigation Jump to search

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.