Home   Help Search Login Register  

Author Topic: check for west side in a vehicle  (Read 478 times)

0 Members and 1 Guest are viewing this topic.

Offline filth

  • Members
  • *
  • Who's the bad man?
check for west side in a vehicle
« 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

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:check for west side in a vehicle
« Reply #1 on: 12 Jun 2005, 15:46:55 »
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

« Last Edit: 12 Jun 2005, 15:50:31 by THobson »

Offline filth

  • Members
  • *
  • Who's the bad man?
Re:check for west side in a vehicle
« Reply #2 on: 12 Jun 2005, 18:54:34 »
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