OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: wastzzz on 05 Sep 2006, 15:11:09
-
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?
-
trigger's condition -
(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:
-
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) ?
-
then leave out the last two vehicle bits... ;)
-
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 :|
-
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
-
Or you can check the distance between the trigger and your soldiers with the distance (http://www.ofpec.com/COMREF/index.php?action=list&letter=d#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.
-
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
-
Try putting vehicle instead of jeep1.. Although that is a guess. If someoen replies sooner with a known fix then take that option :yes:
-
Condition:
vehicle unit1 in thislist AND vehicle unit2 in thislist
~S~ CD
-
Thanks Chris Death, it works :)