049C

From GTAMods Wiki
Revision as of 22:02, 4 September 2017 by Spaceeinstein (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Vice City INITIALISE_OBJECT_PATH


Description
Initialises a script path
Syntax
049C: [var] = scripted_path_file [int] width [flt]
Parameter
[int]
Script path index
[flt]
Width of the path in units
[var]
Variable to store the handle of the script path

This opcode initialises a script path to be used by script. It can be cleared using opcode 04A1. The script path index comes from the path file's number at the end of the file name, i.e. spath0.dat would use a value of 0, spath1.dat would use a value of 1, etc. The width of the path denotes how far from the path can the object be when traveling along the path. The larger the value, the more smooth the path can be, while the smaller the value, the more rigid the path can be. One script path file was used in the original script for Cortez's yacht. A script path file can be initialised more than once. Only three script paths can be loaded at a time; you must clear one before you can initialise another one.

Keywords

initialize, object, script, scripted, path, file