HomePage | RecentChanges | Preferences

create_thread iLabel, argument, argument, ...


Creates a thread at the specified label, and loads its local variables with the arguments.


The label where the newly created thread will start executing.
Zero or more arguments can be supplied. These can be floats or integers of any type (including labels, handles and models). They will be available to the new thread in its local variables (!0, !1, ...).


create_thread @SomeThread, 1000


  wait !0
  ; Do something every !0 milliseconds (determined by the create_thread).
  jump @SomeThread


The create_thread opcode allows for very powerful code to be written, thanks to the arguments that can be supplied. You could, for example, write [a thread that will teleport you between two points], and have the coordinates of the points supplied by the arguments. That way, it's possible to set up multiple teleports simply by using multiple create_threads.


HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited October 16, 2004 2:15 pm by CyQ (diff)
SourceForge.net Logo