Jump to content
Prpa

syncronizing scripted trigger with waypoints

Recommended Posts

First of all, is it even possible to sync scripted trigger with editor placed waypoint? I've been trying to do that for a few days now and just can't get it to work. 

 

I want enemy group (placed in editor) to wait at a waypoint unit a trigger fire. After that group will continue to next waypoint.

I know how to do this in editor, but I would like to learn and understand how to make this via script.

 

So I placed enemy group in editor, in init field of team leader i have qrf2=group this, also variable name is qrf2.

 

In trigger.sqf i have

_trwp1 = createTrigger ["EmptyDetector", [0,0,0], false];
_trwp1 setTriggerArea [0, 0, 0, false];
_trwp1 setTriggerActivation ["none", "PRESENT", false];
_trwp1 setTriggerStatements ["[""tsk1a""] call BIS_fnc_taskState == ""SUCCEEDED"" || [""tsk1c""] call BIS_fnc_taskState == ""SUCCEEDED"" || [""tsk1b""] call BIS_fnc_taskState == ""SUCCEEDED""", "0=[""tsk2"", ""ASSIGNED"",true] spawn BIS_fnc_taskSetState;","deleteVehicle thisTrigger"];
_trwp1 synchronizeTrigger [[qrf1,1], [qrf2,1]];

When I host mission everything works fine. When hosted on dedicated server, after activating trigger enemies are just standing in same spot as before.

 

From my limited knowledge I concluded it has to be something with locality, since everything works fine in editor or hosting on my machine. Would appreciate any help.

 

P.S. also tried

_trwp1 synchronizeTrigger [[group qrf1,1], [group qrf2,1]];

and giving waypoints name (wp1)

_trwp1 synchronizeTrigger [wp1, wp2];

with no luck.

Share this post


Link to post
Share on other sites

Anyone?

Tried to find more documentation and examples but coudn't find any...

Share this post


Link to post
Share on other sites

Whatever for?  Everything in that trigger is hardcoded, just put it on the map and be done with it.

 

If you want to learn something waypoint/trigger related try preplacing the waypoints on the map, deleting that unit after preparing to copy it's waypoints, then have the trigger spawn the units you really wanted and apply the waypoints to the newly spawned units.  group, deleteVehicle and copyWaypoints are commands to look into.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×