OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: filth on 12 Jun 2005, 14:49:54
-
how can i set a trigger to activate when any member of a certain side is in a particular vehicle?
the command for a unit is obviously just 'player in vehicle', but i need to know when ANY member of that side (not just a player's group) is in that vehicle
thx in advance
filth merchant
-
Try something like:
Create a script called say VehicleCheck.sqs
in the init field of the vehicles put :
[this] exec "VehicleCheck.sqs"
The script should be something like:
_veh = _this select 0
@({(side _x) == west} count crew _veh > 0)
put here wahtever you want to do when a west unit is in the vehicle
exit
Not guaranteed
EDIT:
I have just re-read your post. You want a trigger. Okay give the vehicle a name say veh1 and in the condition field of the trigger put
{(side _x) == west} count crew veh1 > 0
-
brilliant.
just what was needed.
thx m8.
btw, while i've got you, do you know how to make a unit join a group when any one of that group gets near that unit.
i'm trying to attach a prisoner to the first group that captures him, (could be anyone in that group who gets near him and could be any one of multiple groups) its a multiplayer game.
hope u can help