Jump to content
mandaloin

Waypoint Sync Between 3 Groups

Recommended Posts

I'm looking for a way to make 3 groups wait for each other at a waypoint before continuing on to the next. It also needs to work even if 1 or more groups is dead. I've tried messing around with the Skip Waypoint trigger but it only deletes a waypoint when one group reaches theirs. It doesn't hold them there until everyone else is ready. Any ideas?

 

Edit: I've been playing around with it and I think if I sync all 3 Hold waypoints to a Skip Waypoint trigger with the right scripting it will work. The scripting for the trigger could be something along the lines of "activate if ((any member of group 1 is present) or (alive members of group 1=0)) and ((any member of group 2 is present) or (alive members of group 2=0)) and ((any member of group 3 is present) or (alive members of group3=0))". I just don't know the right scripting language to make it happen and tinkering around with the scripting commands isn't getting me anywhere. Am I on the right track here?

Share this post


Link to post
Share on other sites

I figured it out thanks to "Nobody" on the Steam discussion page.

 

Here's a link to a custom composition to save yourself some time: https://drive.google.com/file/d/0B1GOBFjzjWgxNG1iQUVnOUM2aUE/view?usp=sharing

Unzip the folder into My Documents/Arma 3/compositions.

Now I'll try to explain the solution to my problem so even the lowest common denominator like me can follow along.
 
Open the attributes of your first group's leader (double click on him). In his Variable Name field, put "t_01", not including quotes. Do the same for the other group leaders, but name them "t_02" and "t_03", respectively.
 
Put down 3 triggers on the same spot as your Hold waypoints. These detect if your group is inside them, so size them accordingly (mine are 10mx10m). Open their attributes and in the Variable Name fiield name the first trg_01. second trg_02, third trg_03. Go back to the map and right click on trg_01. Go to Connect > Set Trigger Owner. Click on the leader of the first group. There should now be a light blue line from the trigger to your group leader. Go back into the attributes for trg_01. Change the Activation to Whole Group or Any Group Member, whichever your preference is. Both will work regardless of how many group members are still alive. Go down to the On Activation field and put "ready_t_01 - true;" without the quotes. Go back to the map and repeat that for trg_02 and trg_03. Make sure to change the numbers according to which group you're working with.
 
Put down 3 Game Logic entities anywhere you want. They're found under Systems > Logic Entities > Objects. In each one's "Init" field put down this:

0 = [] spawn 
{ 
uiSleep 1;
waitUntil 
{ 
_grp = units t_01; 
 {!(alive _x) 
 }forEach _grp; 
}; 
ready_t_01 = true; 
 
 
}; 

Remember to replace all instances of t_01 with t_02 and t_03 for the second and third Game Logic entities.
 
Place another Game Logic entity anywhere you want. In its Init field, put


ready_t_01 = false;
ready_t_02 = false;
ready_t_03 = false;

Put down another trigger. Open its attributes and change in the Type drop down menu change it to Skip Waypoint. In its Condition put

ready_t_01;
ready_t_02;
ready_t_03;

Now go back to the map. Right click on a Hold waypoint and select Connect > Set Waypoint Activation. Click on the Skip Waypoint trigger you just created. There should now be a blue line connecting the trigger and Hold waypoint. Repeat the process for the 2 remaining hold waypoints.
 
And that's it!

  • Like 1

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

×