Jump to content
trollzor45

Triggers activating twice on player-hosted mission?

Recommended Posts

I have a mission full of triggers calling BIS_fnc_kbTell, as well as one trigger also spawning carefully timed vehicles. Inside the editor, and on my system alone, it runs fine.
But I've sent the mission file to a friend to bug test with him and now all the triggers are activating twice. Each sentence in my kbTell funcs are repeating per player, as well as the vehicle spawning triggers spawning vehicles multiple times, causing explosions.

Thing is, I'm not calling scripts where I can put in isDedicated calls, all of this logic is written within the "On Activation" text box.

What might be causing this? How do I fix this issue? 😞

Share this post


Link to post
Share on other sites

Hello, a good start would be your code.

 

Trigger is triggering localy, that's why when you're solo it's OK and with others players it's repeating. You can try with triggering it on server or using a script .sqf with the correct synthax to be MP/dedi friendly.

Share this post


Link to post
Share on other sites
15 hours ago, trollzor45 said:

What might be causing this?

 

10 hours ago, Necropaulo said:

Trigger is triggering localy, that's why when you're solo it's OK and with others players it's repeating.

 

To expand on Necropaulo's answer: This is specifically a problem when using commands with global effect ( all clients see the effect automatically ) inside trigger code which runs locally on each machine. Every client executes the code which essentially multiplies the effect by # of players. You want a car? Everybody gets a car!

 

15 hours ago, trollzor45 said:

How do I fix this issue?

If all code the trigger runs has global effect set it to "Server only", there should be a tickbox in the trigger's attributes editor.

If you are mixing global and local you need to wrap local effects inside: if( iSserver ) then { ... };

  • Like 1

Share this post


Link to post
Share on other sites

Triggers can be server only. In this case the activation code runs on server only. May need some remote execution for desired effect on another PC (client), depending on how argument(s) and effect(s) work in commands of the code . May be not so handy.

 

Non-server only triggers are firing locally but the code runs everywhere the condition is met.

Blufor Present, anyPlayer Present    are met everywhere.

bob inArea thisTrigger , bob in thisList (need pre-condition like above)   are met everywhere bob is defined (everywhere if variable name in editor)

but:

player inArea thisTrigger, player in thisList  fires on player's PC only

 

Then, the activation code itself is effect global whatever the edited trigger is (see more info : makeGlobal in createTrigger command). That means all PCs will be finally sync about the effect of the code.

If you need a specific effect on a specific PC (using local effect commands), you need to script the makeGlobal false  version of the createTrigger command.

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

×