Difference between revisions of "014B"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}} '''CREATE_CAR_GENERATOR'''
| ini        = 014B=13,%13d% %5o% %6d% %7d% %8d% %9d% %10d% %11d% %12d% %1d% %2d% %3d% %4d%
+
<hr />
| description = Initiates a generator to create a parked vehicle
+
'''Description'''
| p1          = X-coordinate
+
: Creates a car generator
| p2          = Y-coordinate
+
'''Syntax'''
| p3          = Z-coordinate
+
: 014B: [''var''] = init_car_generator [''int1''] [''int2''] [''int3''] force_spawn [''int4''] alarm [''int5''] door_lock [''int6''] min_delay [''int7''] max_delay [''int8''] at [''flt1''] [''flt2''] [''flt3''] angle [''flt4'']
| p4          = [[Angle]]
+
'''Parameter'''
| p5          = Valid vehicle [[DFF]] model name or ID number as defined in the [[IDE#CARS|IDE]] file
+
: [''var'']
| p6          = [[Carcols.dat|Primary color]]
+
:: Variable to store the handle of the car generator
| p7          = [[Carcols.dat|Secondary color]]
+
: [''int1'']
| p8          = Force spawn
+
:: Valid vehicle model ID number as defined in the [[CARS (IDE Section)|CARS section]] of the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character (or ''-1'' for a random vehicle)
| p9          = Alarm (based on percent chance)
+
: [''int2'']
| p10        = Door lock (based on percent chance)
+
:: [[Carcols.dat|Primary color]] (or ''-1'' for a random color defined in <code>carcols.dat</code>)
| p11        = ''unknown''
+
: [''int3'']
| p12        = ''unknown''
+
:: [[Carcols.dat|Secondary color]] (or ''-1'' for a random color defined in <code>carcols.dat</code>)
| p13        = Parked vehicle generator's handle
+
: [''int4'']
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]], [[Liberty City Stories]] (0150), [[Vice City Stories]] (00A9)
+
:: Force spawn
| native      = [[CREATE_CAR_GENERATOR]]
+
: [''int5'']
}}
+
:: Alarm (based on percent chance)
This creates a parked vehicle at a coordinate. This opcode needs opcode [[014C]] for the vehicle to spawn. Unlike opcode [[00A5]] or others similar to it, you do not need to request to model of the vehicle. In San Andreas, the [[Item_Placement#CARS|CARS]] section of the IPL works similar to this opcode. The car will be spawned as not owned by the player so if you enter the car in front of the police, you will be wanted. Note that the parameters are mixed around.
+
: [''int6'']
[[Sanny Builder]] example:<source lang="scm">014B: 0@ = car_generator #PONY color -1 -1 0 alarm 0 door_lock 0 0 10000 at 0.0 0.0 0.0 angle 0.0</source>
+
:: Door lock (based on percent chance)
 +
: [''flt1'']
 +
:: X-coordinate
 +
: [''flt2'']
 +
:: Y-coordinate
 +
: [''flt3'']
 +
:: Z-coordinate
 +
: [''flt4'']
 +
:: [[Heading]]
 +
'''Native analog'''
 +
: [[CREATE_CAR_GENERATOR]]
  
Parameter 5: Using a value of <i>-1</i> will generate a random vehicle. The vehicle is usually a vehicle already driving on the road.<br>
+
This creates a car generator at the coordinates point. A car generator allows the creation of a perpetually spawning vehicle, which requires opcode [[014C]] to control the spawning. Unlike opcode [[00A5]] or others similar to it, you do not need to request to model of the vehicle. In San Andreas, the [[Item_Placement#CARS|CARS]] section of the IPL works similar to this opcode. The car will be spawned as not owned by the player so if you enter the car in front of the police, you will be wanted. In San Andreas, parked vehicles will not be created while you are inside an [[interior]].
Parameter 6 and 7: Using a value of <i>-1</i> will let the game randomly select the colors defined in <code>carcols.dat</code>.<br>
 
Parameter 8: Force spawn is forcing the vehicle to spawn more often, sometimes even spawning it right in front of you.<br>
 
Parameter 9 and 10: The alarm and door lock of the vehicle is based on a percent chance of occurring. A value of <i>0</i> means 0% chance of triggering an alarm or 0% chance of the door being locked. A value of <i>100</i>  means 100% chance of triggering an alarm or 100% chance of the door being locked.
 
  
The limit for the amount of defined parked cars in GTA3: 160; Vice City: 185; San Andreas: 500.
+
Force spawn is forcing the vehicle to spawn more often, sometimes even spawning it right in front of you. Without force spawn, the vehicle may not spawn when approaching the location of the vehicle too quickly. The alarm and door lock of the vehicle is based on a percent chance of occurring. A value of <i>0</i> means 0% chance of triggering an alarm or 0% chance of the door being locked. A value of <i>100</i>  means 100% chance of triggering an alarm or 100% chance of the door being locked. The limit for the amount of defined parked cars in GTA III: 160; Vice City: 185; San Andreas: 500. The data is saved in [[Saves (GTA 3)#Block 13: Car Generators|block 13 of the save file]] in GTA III, [[Saves (GTA VC)#Block 14: Car Generators|block 14]] in Vice City, and [[Saves (GTA SA)#Block 12: Car Generators|block 12]] in San Andreas.
  
==Notes==
+
== See also ==
The above format is more commonly used. The actual format of this opcode is in order:<br>
+
* [[Spawn a vehicle]]
<code>014B=13,%1d% %2d% %3d% %4d% %5o% %6d% %7d% %8d% %9d% %10d% %11d% %12d% %13d%</code><br>
 
The format to use depends on which INI file you use.
 
  
In San Andreas, parked vehicles will not be created while you are inside an [[interior]].
+
== Keywords ==
 +
create, parked, car, vehicle, generator
  
==See also==
+
[[Category:OpCodes]]
*[[Spawn a vehicle]]
 
 
 
==Keywords==
 
create, parked, car, vehicle, generator
 

Revision as of 09:20, 28 June 2015

GTA III Vice City San Andreas CREATE_CAR_GENERATOR


Description

Creates a car generator

Syntax

014B: [var] = init_car_generator [int1] [int2] [int3] force_spawn [int4] alarm [int5] door_lock [int6] min_delay [int7] max_delay [int8] at [flt1] [flt2] [flt3] angle [flt4]

Parameter

[var]
Variable to store the handle of the car generator
[int1]
Valid vehicle model ID number as defined in the CARS section of the IDE file; also acceptable is model's DFF name with a hash character (or -1 for a random vehicle)
[int2]
Primary color (or -1 for a random color defined in carcols.dat)
[int3]
Secondary color (or -1 for a random color defined in carcols.dat)
[int4]
Force spawn
[int5]
Alarm (based on percent chance)
[int6]
Door lock (based on percent chance)
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate
[flt4]
Heading

Native analog

CREATE_CAR_GENERATOR

This creates a car generator at the coordinates point. A car generator allows the creation of a perpetually spawning vehicle, which requires opcode 014C to control the spawning. Unlike opcode 00A5 or others similar to it, you do not need to request to model of the vehicle. In San Andreas, the CARS section of the IPL works similar to this opcode. The car will be spawned as not owned by the player so if you enter the car in front of the police, you will be wanted. In San Andreas, parked vehicles will not be created while you are inside an interior.

Force spawn is forcing the vehicle to spawn more often, sometimes even spawning it right in front of you. Without force spawn, the vehicle may not spawn when approaching the location of the vehicle too quickly. The alarm and door lock of the vehicle is based on a percent chance of occurring. A value of 0 means 0% chance of triggering an alarm or 0% chance of the door being locked. A value of 100 means 100% chance of triggering an alarm or 100% chance of the door being locked. The limit for the amount of defined parked cars in GTA III: 160; Vice City: 185; San Andreas: 500. The data is saved in block 13 of the save file in GTA III, block 14 in Vice City, and block 12 in San Andreas.

See also

Keywords

create, parked, car, vehicle, generator