Jump to content
Sign in to follow this  
helling3r

locality issues with triggers and variables?

Recommended Posts

Hello,

in my mission CO18Frontline/Chernarus i have some errors that do not appear in singleplayer, so i guess they are caused by some locality issues i do not get.

In the mission i try to separate things by triggers, to be able to debug them separately.

When the mission starts, some units are behind a sandbag line and their init tells them to sty kneeled. The leader is set to "enableAttack=false" so he does not issue engage-commands so the team members stay in place.

I want them to be freed once a certain condition is met, so the player as squad leader can use high command to move the teams around.

This is implemented by a trigger. The condition field has "variable1==true".

variable1 is set by another trigger once a town area is secured by BLUFOR which also sets a task to succeeded.

However, in multiplayer the trigger for freeing the teams does not fire, however the trigger for the town fires (task is set to completed).

What is the problem here? I thought that both is true:

- Editor placed units are local to the server unless a human player is in the team

- Triggers are present at all machines and fire independently there

-> leads me to the conclusion that variable1 should be local to each machine without the need to broadcast.

How can this be fixed?

Edited by helling3r

Share this post


Link to post
Share on other sites

Thanks for the tip, i already know that site. Unfortunately i cant derive the information needed to solve my problem.

As stated above, since triggers should be executed on any machine including the server, i would suppose that the variable declaration should work too. Since the trigger checks the variable, it should fire on any client. That the "unfreeze" will only work where the units are local should not be an issue because somewehre they should be local (the server since its ai)...

Share this post


Link to post
Share on other sites

Why not let your code speak? Aka post it here / in pastebin?

Share this post


Link to post
Share on other sites

The PBO is linked above. The triggers in question are located near the south of Nadezdino, northwest of the southern teams there.

Share this post


Link to post
Share on other sites

Just as an advice out of experience:

People will not dig into your scripts. It is up to you to present the relevant code.

My advice:

# Debug the MP with diag_log to see whats going on

# Initialize your global variables in the init.sqf

# Use the editor only for unit/object placement and script all the rest - only that way you have full control and understand what's going in.

To use triggers, unit inits, and even waypoints from the editor can cause serious

headaches in MP when you run into issues and have trouble to find the very specific issue.

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  

×