OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: st3a1th on 08 Feb 2010, 20:05:53

Title: Trigger Switch
Post by: st3a1th on 08 Feb 2010, 20:05:53
Hello I am trying to get this trigger to switch units from waypoint0 to waypoint1 but can't seem to get it working. I checked the marker names and unit init and all is ok that side. I would like it to be set of by blufor and then switch the group to move. Can anyone help ?

_unit = _this select 0;
_group = group _unit;

_waypoint0 = _group addwaypoint[getmarkerpos"East_WP_1",0];
_waypoint0 setwaypointtype"Hold";
      

_trg0 = createTrigger["EmptyDetector",getmarkerpos"trig1"];
_trg0 setTriggerArea[50, 50, 0, false];
_trg0 setTriggerActivation["WEST","PRESENT",false];
_trg0 setTriggerType "SWITCH";
_trg0 setTriggerStatements ["this", "", ""];
_trg0 synchronizeTrigger [_waypoint0,_waypoint1];
_trg0 setTriggerText "Call for support";


_waypoint1 = _group addwaypoint[getmarkerpos"East_WP1_2",0];
_waypoint1 setwaypointtype"Move";

Thanks
Title: Re: Trigger Switch
Post by: RangerX3X on 09 Feb 2010, 23:57:29
Waypoint 0 is where the group starts, with no waypoints. The first waypoint assigned to that group is waypoint 1.

_waypoint0 setwaypointtype"Hold"; should be _waypoint1 setwaypointtype"Hold";