Jump to content
Sign in to follow this  
xendance

Synchronized waypoints between groups problem.

Recommended Posts

Hi,

I'm working on a mission where I have put few squads to advance synchronously across terrain.

The problem I have is that IF some of the groups gets wiped out completely, it doesn't remove the synchronization of waypoints for that squad. So I have one or more squads waiting at their waypoints for the last (dead) squad to reach their waypoint. How can I prevent this? Imo Bohemia should change the synchronization logic so that all synchronization of a group/unit is removed when it dies to prevent situations like this.

Here's a pic to illustrate the problem: http://i.imgur.com/WG2vZEd.png

Share this post


Link to post
Share on other sites

I'd remove the synchronization between AI and the player, and make sure the player's waypoints always work and then make the AI follow via triggers and whatnot.

Share this post


Link to post
Share on other sites
I'd remove the synchronization between AI and the player, and make sure the player's waypoints always work and then make the AI follow via triggers and whatnot.

That is just to illustrate what the problem was. In the actual mission I have about 9 groups which I need to synchronize, and they're all AI.

Edit: I suppose it's best to do it the "real way" and just trigger the waypoints using the time.

Share this post


Link to post
Share on other sites

Just did a quick test, and after about 30 seconds the units do actually continue on their waypoints after the other group is dead. It seems like it takes the game a bit of time to remove the synchronization of that dead group's waypoints. But in order for them to move at the same time you'd need to have every group's waypoints synched to every other group's waypoints, not just to the waypoint of the group next to it.

Share this post


Link to post
Share on other sites
Just did a quick test, and after about 30 seconds the units do actually continue on their waypoints after the other group is dead. It seems like it takes the game a bit of time to remove the synchronization of that dead group's waypoints. But in order for them to move at the same time you'd need to have every group's waypoints synched to every other group's waypoints, not just to the waypoint of the group next to it.

Yea I know that the synchronization lines form a complete graph (if edges are the sync lines and vertices are the groups). But I gotta re-test if you managed the AI to advance, cheers :)

Share this post


Link to post
Share on other sites

It seems like it might be a bug though, that the game doesn't remove the sync dependency of dead groups immediately. I can think of other ways to make sure the other groups move on immediately but with the number of groups you're using it would be pretty tedious.

Edited by 2nd Ranger

Share this post


Link to post
Share on other sites

You could put something like this in the init of all the units.

handle = this spawn {
waitUntil { {alive _x}count (units (group _this)) == 0};
{
	_x synchronizeWaypoint [];
}forEach (waypoints (group _this));
};

When ever the whole group dies it checks all of their waypoints and de-syncs them. Maybe better to make it into a function and just send it each group to monitor rather than every unit spawning a thread but the above works as an example.

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
Sign in to follow this  

×