zectbumo 10 Posted May 8, 2016 I can't seem to figure out how to script a guard waypoint. I think I'm having trouble with synchronizing the trigger with the waypoint. I am trying this: private _trigger = createTrigger ["EAST G", getMarkerPos "guard_1"]; { if (side _x == east) then { private _wp = _x addWaypoint [position leader _x, 0]; _wp setWaypointType "GUARD"; _trigger synchronizeWaypoint [_wp]; }; } forEach allGroups; The units do not seem to guard the marker position. If I manually create this using the editor and I synchronize the waypoint with a trigger made in the editor then it works fine. But I need to make this work solely in a script. Share this post Link to post Share on other sites
JasperRab 26 Posted May 8, 2016 private _trigger = createTrigger ["EAST G", getMarkerPos "guard_1"]; Never seen createTrigger get used like that, might be wrong but I don't think thats how you create a trigger. I create triggers like this, _trigger = createTrigger ["EmptyDetector", getMarkerPos "guard_1"]; and then use setTriggerActivation and setTriggerStatements to set the activation and statements. But might be wrong, if this is new, why didn't I know about this earlier? Did you check if the trigger works? Share this post Link to post Share on other sites
tryteyker 28 Posted May 8, 2016 Adding on what Jasper said, you need to use setTriggerType to set it to "EAST G" after creating the trigger (using EmptyDetector). Share this post Link to post Share on other sites