Move an object

From GTAMods Wiki
Jump to navigation Jump to search

This article descripes how to create and move an object.

0004: $MY_OBJECT = #WOODENBOX
0247: load_model $MY_OBJECT

:LOADER
0001: wait 0 ms
00D6: if 0
0248:   model $MY_OBJECT available
004D: jump_if_false @LOADER
029B: $MY_OBJECT_HANDLE = init_object $MY_OBJECT at 0.0 0.0 0.0 

:MOVE_OBJECT
0001: wait 0 ms
00D6: if 0 
034E:   move_object $MY_OBJECT_HANDLE to 0.0 0.0 100.0 speed 0.0 0.0 0.1 flag 1 
004D: jump_if_false @MOVE_OBJECT
0249: release_model $MY_OBJECT
01C4: remove_references_to_object $MY_OBJECT

See also

  • 034E – move an object and check if it has arrived the target location.
  • 834E – move an object and check if it has not yet arrived the target location.