Author Topic: Vehicle Dismount Support Script  (Read 10136 times)

Vehicle Dismount Support

What does it do?

This add-on lets you define where a player exits a specific vehicle and in which direction they are looking when doing so, both depending on the seat they're sitting in. For example the driver exits below the vehicle and seat 2 and 3 at the sides facing away from the vehicle.

It works for turrets and the likes, too. If a turret is mounted to a vehicle, the player will exit it at the position defined for the slot the turret is mounted to. For example you exit the tank turret behind it, but in the tank you exit the turret at the side.

How do I use it?

To make use of it, just a handful of additional lines in the vehicle or player datablock are required.

Code: [Select]
dismountOffset[x] = "1 2 -3";
This defines where the player exits relative to the vehicle. X is the slot number.

Code: [Select]
dismountAngle[x] = 90;
This is the direction the player is facing when exiting. 0 is the same direction as the vehicle, 90 is left, -90 right and 180 the opposite direction. If not defined, the player will look in the same direction as the vehicle.

To use this support script in a vehicle you need to set the dismountOffset for slot 0 in its datablock. The offset and angle for slot 0 act as default values for the vehicle. If a seat does not have a direction defined it will use the one for seat 0. If a seat does not have an angle defined it will use the one for seat 0.

Which vehicles make use of it?

This add-on currently affects the following vehicles:

- About all default vehicles
- A-10
- Advanced Horse
- Apache
- Armored Van
- Bengs 190 D
- Blocko Sedan
- Delivery Van
- Explorer
- Fighter Jet
- Halftrack
- Heavy Machinegun
- Humvee
- Lego Quad Bike
- Microbus
- Oldtimer
- Puma
- T-90
- Turismo
- UH-1 (The one I made, not the old one)

As time goes on I'll add more vehicles. Of course you can contribute and post/send a PM with the add-on name/datablock and the values you set for it. I will then add them. If you wish to have your vehicle(s) removed, tell me.

« Last Edit: February 24, 2013, 01:03:59 PM by Gravity Cat »

Yay, we finally have this! Thanks GCat!

Code: [Select]
dismountAngle[x] = 90;
This is the direction the player is facing when exiting. 0 is the same direction as the vehicle, 180 the opposite. If not defined, the player will look in the same direction as the vehicle.

...and would 90 be left or right?

presumably to the right, since that's how xyz coordinates usually work

...and would 90 be left or right?
Left actually. Let me clarify in the OP...

I just tried this out in-game.

And it's really fantastic. This needs to be like, part of the default game so every vehicle has this.



Dammit, I nearly forgot about this topic drowning.

Good thing you didn't.
Put it on RTB. :D


This is my new favorite add-on

I'm sick of not being able to get out of forgethuge vehicles

cough heed cough

you should add support for default vehicles