Jump to content
Sign in to follow this  
Bon

Problems with Synchronization

Recommended Posts

Hi mates,

have two small problems, and I really hope u could help me out.

1. synchronizing Waypoints dynamically in scripts doesn't seem to work. I'm generating some units, soldiers as well as crewmen and cars, place the crewmen to vehicle operating positions and the soldiers to cargo. Crewmen and soldiers are both in different groups.

Now I add some waypoints both to the crew of the cars (waypointtype "TR UNLOAD") and the soldiers (waypointtype "GETOUT"). Here's the code I'm generating the waypoints with:

	WPGrp1_1 = GroupSoldiers addWaypoint [_target,0];
WPGrp1 setWaypointType "GETOUT";
WPGrp1 setWaypointSpeed "FULL";

	WPCars1 = GroupCars addWaypoint [_target,0];
WPCars1 setWaypointType "TR UNLOAD";
WPCars1 setWaypointSpeed "FULL";

Well, without placing the soldiers to cargo, both the groups move to their destination. Placing the soldiers to cargo and adding the following line:

[GroupCars,0] synchronizeWaypoint [[GroupSoldiers,0]];

in purpose to release the soldiers from Cargo when arriving at the waypoint location, nothing happens, the soldiers stay in the cars.

Second Problem:

I want to dynamically synchronize players with module logics, especially the Construction Manager Module. So placing such module in the editor (lets give it the name "COIN") and calling a script containig the line

player synchronizeObjectsAdd [COIN]

the list of synchronized objects of the player contains COIN, but I still cannot open the Constuction Manager via action menu.

Any suggestions? Thx alot.

Share this post


Link to post
Share on other sites

The waypoints check for synchronisation on creation. At that time dynamic created waypoints aren't synchronised so the waypoint types will fail.

The same seems to be with the CMM: It is checking for the synchronisation at the creation time but can't find anything.

But this should be solvable: We can run the init again since it is a script :>

Share this post


Link to post
Share on other sites

But this should be solvable: We can run the init again since it is a script :>

Do you mean my Init.sqf file? Does that effect anything? Till now, there are just some Variables defined, like configuring the bis_coin_0.

Or do you mean some internal init? Then it would be nice if this init-re-execution was initialized at least after synchronizing objects during the game.

So far I worked around the problems

- by replacing the waypoint creation with doMove and commands like unassignVehicle, doGetOut aso. (what is, actually, perhaps a better solution :D )

- having the player synchronized with the CMM Logic from the beginning, then using the BIS_COIN_actionCondition to control wether the Logic can be used or not. That was something I tried to avoid because this condition checking is done every frame, and one of my main goals is to safe performance.

btw, thx for your answer i0n0s

Edited by Bon

Share this post


Link to post
Share on other sites

Regarding your first problem I don't think it is necessary to have a "Get out" waypoint at all. "Transport unload" should do the trick, just give the soldiers a "Move" waypoint for example somewhere, transport will drive to it's wp and unload troops, troops will continue on foot to their wp.

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  

×