Difference between revisions of "049C"

From GTAMods Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{OpCode
+
{{Icon|VC}}
| ini        = 049C=3,%3d% %1h% %2d%
+
<hr />
| description = Creates a [[Scripted Path|scripted path file]]
+
'''Description'''
| p1          = Scripted path file ID
+
: Defines a [[Script Path|script path file]]
| p2          = Width
+
'''Syntax'''
| p3          = Scripted path handle
+
: 049C: [''var''] = scripted_path_file [''int''] width [''flt'']
| game        = [[Vice City]]
+
'''Parameter'''
}}
+
: [''var'']
This opcode defines the scripted file to be used by other [[Scripted Path#Scripting|related opcodes]]. The first parameter comes from the path file's number at the end of the file name, i.e. spath0.dat would be ID 0, spath1.dat would be ID 1, etc. The second parameter 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. More than one handle can be defined for a scripted path file. Only one scripted path file was used by default but additional scripted paths can be created and used. Note that the parameters are rearranged.
+
:: Variable to store the handle of the script path
[[Sanny Builder]] example:<source lang="scm">049C: 0@ = scripted_path_file 0 width 5.0</source>
+
: [''int'']
 +
:: Script path file ID
 +
: [''flt'']
 +
:: Width of the path in units
  
==Note==
+
This opcode defines a script path file to be used by other [[Scripted Path#Scripting|related opcodes]]. The first parameter comes from the path file's number at the end of the file name, i.e. <code>spath0.dat</code> would use a value of 0, <code>spath1.dat</code> would use a value of 1, etc. The second parameter 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. More than one handle can be defined for a scripted path file. Only one script path file was used by default but additional script paths can be created and used.
The above format is more commonly used. The actual format of this opcode is in order:<br>
+
 
<code>049C=3,%1d% %2h% %3d%</code><br>
+
[[Category:OpCodes]]
The format to use depends on which INI file you use.
 

Revision as of 01:31, 5 December 2011

Vice City


Description

Defines a script path file

Syntax

049C: [var] = scripted_path_file [int] width [flt]

Parameter

[var]
Variable to store the handle of the script path
[int]
Script path file ID
[flt]
Width of the path in units

This opcode defines a script path file to be used by other related opcodes. The first parameter 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 second parameter 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. More than one handle can be defined for a scripted path file. Only one script path file was used by default but additional script paths can be created and used.