Home   Help Search Login Register  

Author Topic: activating a trigger when unit1 and unit2 are present  (Read 1731 times)

0 Members and 1 Guest are viewing this topic.

wastzzz

  • Guest
like subject.. i need to activate a trigger when both unitName1 and unitName2 are present in the trigger area.
any suggestion please?

oh, another question: how do i make it triggerable only if those units are are on foot?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: activating a trigger when unit1 and unit2 are present
« Reply #1 on: 05 Sep 2006, 16:11:26 »
trigger's condition -

Code: [Select]
(unit_1 in thislist) and (unit_2 in thislist) and ((vehicle unit_1) == unit_1) and ((vehicle unit_2) == unit_2)
untested, but i think it's okay.

oh, and welcome to OFPEC!  :thumbsup:

wastzzz

  • Guest
Re: activating a trigger when unit1 and unit2 are present
« Reply #2 on: 05 Sep 2006, 19:40:42 »
thanks :D
and what if i want to activate a trigger only if unit1 and unit2 are inside the area (no matter if they are on a vehicle or on foot) ?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: activating a trigger when unit1 and unit2 are present
« Reply #3 on: 05 Sep 2006, 20:07:13 »
then leave out the last two vehicle bits... ;)

wastzzz

  • Guest
Re: activating a trigger when unit1 and unit2 are present
« Reply #4 on: 05 Sep 2006, 20:14:15 »
then leave out the last two vehicle bits... ;)
ye i tried that, however it works if the 2 units are on foot, but doesn't work if they are on a vehicle togheter :|

Offline rhysduk

  • Former Staff
  • ****
Re: activating a trigger when unit1 and unit2 are present
« Reply #5 on: 05 Sep 2006, 20:31:30 »
Try this:

(unit_1 in thislist) and (unit_2 in thislist) and (unit_1 in jeep1) and (_unit2 in jeep1)

where jeep1 is the name of the vehicle

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline Cheetah

  • Former Staff
  • ****
Re: activating a trigger when unit1 and unit2 are present
« Reply #6 on: 05 Sep 2006, 20:42:50 »
Or you can check the distance between the trigger and your soldiers with the distance command.

Because it can be the problem that only the name of the vehicle is in the array and not the unit in the vehicle.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

wastzzz

  • Guest
Re: activating a trigger when unit1 and unit2 are present
« Reply #7 on: 05 Sep 2006, 20:47:07 »
Try this:

(unit_1 in thislist) and (unit_2 in thislist) and (unit_1 in jeep1) and (_unit2 in jeep1)

where jeep1 is the name of the vehicle

Rhys

i don't wanna name the vehicle, could be any

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: activating a trigger when unit1 and unit2 are present
« Reply #8 on: 05 Sep 2006, 20:48:58 »
Try putting vehicle instead of jeep1.. Although that is a guess. If someoen replies sooner with a known fix then take that option  :yes:

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re: activating a trigger when unit1 and unit2 are present
« Reply #9 on: 05 Sep 2006, 21:26:21 »
Condition:
Code: [Select]
vehicle unit1 in thislist AND vehicle unit2 in thislist
~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

wastzzz

  • Guest
Re: activating a trigger when unit1 and unit2 are present
« Reply #10 on: 05 Sep 2006, 22:06:01 »
Thanks Chris Death, it works :)