0464

From GTAMods Wiki
Jump to navigation Jump to search

Vice City San Andreas ATTACH_CHAR_TO_CAR


Description
Attaches the character to the vehicle
Syntax
0464: put_actor [char handle] into_turret_on_car [car handle] at_car_offset [flt1] [flt2] [flt3] position [int1] angle [flt4] with_weapon [int2]
Parameter
[char handle]
The handle of the character
[car handle]
The handle of the vehicle
[flt1]
X-offset relative to the center of the vehicle
[flt2]
Y-offset relative to the center of the vehicle
[flt3]
Z-offset relative to the center of the vehicle
[int1]
Facing relative to vehicle (see below)
[flt4]
Range in degrees
[int2]
Weapon type

This opcode attaches the character to the vehicle. The weapon with 30,000 ammo is given to the character. The weapon must be loaded, usually through opcode 0247, in order for the weapon to appear. If used on the player character, it will place the player into first-person view. The range denotes the horizontal axis that the character can shoot from the direction it faces. For example, a value of 90.0 means the character can shoot up to 90 degrees to the left and up to 90 degrees to the right of its facing direction, for a total of 180 degrees movement. A range of 180.0 allows full 360 degrees movement. The following is a table of values denoting the direction the character faces relative to the vehicle. Any values outside the range will always point the character forward.

Facing Enum
0 FACING_FORWARD
1 FACING_LEFT
2 FACING_BACK
3 FACING_RIGHT

The character remains upright relative to the vehicle and will roll with the vehicle. If the character is killed, it will not drop any items and its collision remains unless the body touches the ground. Bullets fired by the character do not damage the vehicle but they do not go through it. For the player, weapons that do not fire single bullets behave oddly. Shotguns and the Flamethrower cannot be aimed along the vertical axis. The Rocket Launcher and sniper rifles do not work at all. Projectiles like grenades and Molotov Cocktail can be thrown at a very fast rate.[1] This opcode is no operation in GTA III.

Keywords

attach, put, actor, character, car, vehicle, turret, mode

Reference