OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started 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?
-
Good question, test it.
In the waypoint following the getout waypoint, insert jim setdammage 1 in the onactivation field and see what happens.
-
Vehicle.....
So how would I give the driver a name?
-
To name the driver, use:
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.
DriverN setdammage 1;
-
...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 :)