Difference between revisions of "014B"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Icon|trilogy}} '''CREATE_CAR_GENERATOR'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = CREATE_CAR_GENERATOR
: Creates a car generator
+
| description = Creates a car generator
'''Syntax'''
+
| syntax1    = 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'']
: 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'']
+
| p1t        = [''flt1'']
'''Parameter'''
+
| p1d        = X-coordinate
: [''var'']
+
| p2t        = [''flt2'']
:: Variable to store the handle of the car generator
+
| p2d        = Y-coordinate
: [''int1'']
+
| p3t        = [''flt3'']
:: 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)
+
| p3d        = Z-coordinate + 0.015 units (or &le;''-100.0'' for [[02CE|ground z]])
: [''int2'']
+
| p4t        = [''flt4'']
:: [[Carcols.dat|Primary color]] (or ''-1'' for a random color defined in <code>carcols.dat</code>)
+
| p4d        = [[Heading]]
: [''int3'']
+
| p5t        = [''int1'']
:: [[Carcols.dat|Secondary color]] (or ''-1'' for a random color defined in <code>carcols.dat</code>)
+
| p5d        = Valid model index 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)
: [''int4'']
+
| p6t        = [''int2'']
:: Force spawn
+
| p6d        = [[Carcols.dat|Primary color]] (or ''-1'' for a random color defined in <code>carcols.dat</code>)
: [''int5'']
+
| p7t        = [''int3'']
:: Alarm (based on percent chance)
+
| p7d        = [[Carcols.dat|Secondary color]] (or ''-1'' for a random color defined in <code>carcols.dat</code>)
: [''int6'']
+
| p8t        = [''int4'']
:: Door lock (based on percent chance)
+
| p8d        = Force spawn
: [''flt1'']
+
| p9t        = [''int5'']
:: X-coordinate
+
| p9d        = Alarm chance (''0'' to ''100'')
: [''flt2'']
+
| p10t        = [''int6'']
:: Y-coordinate
+
| p10d        = Door lock chance (''0'' to ''100'')
: [''flt3'']
+
| p11t        = [''int7'']
:: Z-coordinate
+
| p11d        = Minimum delay between creation (''0'' to ''65535'')
: [''flt4'']
+
| p12t        = [''int8'']
:: [[Heading]]
+
| p12d        = Maximum delay between creation (''0'' to ''65535'')
'''Native analog'''
+
| p13t        = [''var'']
: [[CREATE_CAR_GENERATOR]]
+
| p13d        = Variable to store the handle of the car generator
 +
| native      = [[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 [[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]].
+
This opcode creates a car generator at the coordinates point. The car generator allows the creation of a perpetually spawning vehicle, behaving like a parked vehicle. It requires opcode [[014C]] to switch on the generator. Unlike opcode [[00A5]] or others similar to it, you do not need to request the model of the vehicle. In San Andreas, the [[CARS (IPL Section)|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 level|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 <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.
+
The game adds 0.015 units to your z-coordinate value if you want to be really precise. Force spawn is forcing the vehicle to spawn more readily, 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 minimum and maximum delay values do not seem to be used by the game.
 +
 
 +
The limit for the amount of defined car generators 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.
  
 
== See also ==
 
== See also ==
Line 40: Line 44:
 
== Keywords ==
 
== Keywords ==
 
create, parked, car, vehicle, generator
 
create, parked, car, vehicle, generator
 
[[Category:OpCodes]]
 

Latest revision as of 23:58, 19 November 2016

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
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate + 0.015 units (or ≤-100.0 for ground z)
[flt4]
Heading
[int1]
Valid model index 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 chance (0 to 100)
[int6]
Door lock chance (0 to 100)
[int7]
Minimum delay between creation (0 to 65535)
[int8]
Maximum delay between creation (0 to 65535)
[var]
Variable to store the handle of the car generator
Native analog
CREATE_CAR_GENERATOR

This opcode creates a car generator at the coordinates point. The car generator allows the creation of a perpetually spawning vehicle, behaving like a parked vehicle. It requires opcode 014C to switch on the generator. Unlike opcode 00A5 or others similar to it, you do not need to request the 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.

The game adds 0.015 units to your z-coordinate value if you want to be really precise. Force spawn is forcing the vehicle to spawn more readily, 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 minimum and maximum delay values do not seem to be used by the game.

The limit for the amount of defined car generators 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