OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: stephen271276 on 31 Jan 2011, 16:40:34

Title: Naming vehicles
Post by: stephen271276 on 31 Jan 2011, 16:40:34
If I name an opfor Vehicle "jim", but during a WP controlled patrol I place a "Get Out" WP is the vehicle still called "jim" or the driver who has got out?
Title: Re: Naming vehicles
Post by: savedbygrace on 31 Jan 2011, 17:43:30
Good question, test it.

In the waypoint following the getout waypoint, insert jim setdammage 1 in the onactivation field and see what happens.
Title: Re: Naming vehicles
Post by: stephen271276 on 31 Jan 2011, 18:45:09
Vehicle.....
So how would I give the driver a name?
Title: Re: Naming vehicles
Post by: SaOk on 31 Jan 2011, 22:29:23
To name the driver, use:
Code: [Select]
DriverN = driver jim;
The driver needs to be inside the car when the code is used. After that you can use DriverN to operate with that unit that was driving the car in that moment even if he have already abandoned the car.

Code: [Select]
DriverN setdammage 1;


Title: Re: Naming vehicles
Post by: Barbolani on 03 Feb 2011, 12:21:05
...or:

Place in the map an empty car, name it as you want

Place an inf unit in map, name it jim

On the init field of the inf unit put: "This MoveInDriver <nameofthecar>"

Instantly teleports jim to the driver position on the car, and later you can do whatever you want with both units,cos they have their own name :)