OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mad Pup on 09 Mar 2012, 02:42:14

Title: [SOLVED]Action in Vehicle
Post by: Mad Pup on 09 Mar 2012, 02:42:14
I was wondering if it is possible to have a player use an action while in a vehicle.

Example:
Sport Car Yellow = car1
Civillian = civ1

civ1 is in car1

Code: [Select]
civ1 addaction ["SET UP","set.sqs"]He has to get out of the vehicle in order to see/execute this action.

Code: [Select]
car1 addaction ["SET UP","set.sqs"]
I have not tried this, but would this give this action to anybody in the car?
THANKS!

-Mad Pup
Title: Re: Action in Vehicle
Post by: Gruntage on 09 Mar 2012, 09:03:10
Code: [Select]
car1 addaction ["SET UP","set.sqs"]
In theory this should give the action to anyone in the car. A car radio script that I found has:

Code: [Select]

_veh = _this select 0

_veh addaction ["Turn music player on", "PlayRoadMusic.sqs"]


So the 'action' is added to the vehicle, which means that any of the occupants can use the action.
Title: Re: Action in Vehicle
Post by: Mad Pup on 09 Mar 2012, 21:45:02
Sweet thanks Gruntage!

-Mad pup