Rebitaay 13 Posted May 23, 2017 Hi all, Currently working on my second mission, and the multiplayer aspects of things are giving me a headache. I've crushed many bugs, but one that I can't seem to figure out is that many of my triggers are firing twice for one activation. This only happens in multiplayer with another player connected. For example: I have a trigger that detects when there are no OPFOR left, then spawns more. Occasionally, this ends up spawning 2x enemies or even 3x, rarely. Another example is I have a script that detects when there is no plane in a hangar and spawns a new plane, and it occasionally spawns two at once and everything goes to shit. I can upload the mission file if necessary. Any help would be greatly appreciated. Share this post Link to post Share on other sites
Mokka 29 Posted May 23, 2017 (edited) This sounds like a locality issue. Make sure that unit spawning is limited to the server-side only. Limit script execution in MP using (eg) these commands, pretty self-explanatory: isServer isDedicated hasInterface Killzone_Kid has given a great explanatory sketch on how these work and what they mean: if (isDedicated) then { //run on dedicated server only }; if (isServer) then { //run on dedicated server or player host }; if (hasInterface) then { //run on all player clients incl. player host }; if (!isDedicated) then { //run on all player clients incl. player host and headless clients }; if (!isServer) then { //run on all player clients incl. headless clients but not player host }; if (!hasInterface) then { //run on headless clients and dedicated server }; if (!hasInterface && !isDedicated) then { //run on headless clients only }; Found some more resources: https://community.bistudio.com/wiki/Locality_in_Multiplayer http://killzonekid.com/arma-scripting-tutorials-locality/ Edited May 23, 2017 by Mokka Added a few more references 2 Share this post Link to post Share on other sites
Rebitaay 13 Posted May 23, 2017 @Mokka Great info, I'll give some of these a try and report back once I've tested it with a buddy. Thanks! Share this post Link to post Share on other sites
Mokka 29 Posted May 23, 2017 In case you were wondering, you can join "yourself" twice. See below post for reference: Share this post Link to post Share on other sites
Mokka 29 Posted May 23, 2017 Oh, wait. That's you, isn't it......... 2 Share this post Link to post Share on other sites
Rebitaay 13 Posted May 23, 2017 1 minute ago, Mokka said: Oh, wait. That's you, isn't it......... Haha! I'm going to set that up eventually. Share this post Link to post Share on other sites
Midnighters 152 Posted May 24, 2017 are you placing the trigger in the editor or is it scripted? Share this post Link to post Share on other sites
pierremgi 4893 Posted May 24, 2017 You just have to run on server only (as far as you spawn units/vehicles and you don't have any headless client). So check that in a trigger edited or add if (isServer) then { your trigger here } in a script. Share this post Link to post Share on other sites
Rebitaay 13 Posted May 24, 2017 @Mokka Forgot to report back, whoops! Just wanted you to know that you're a beautiful bastard. The info you gave me made everything magically work. Share this post Link to post Share on other sites
Mokka 29 Posted May 24, 2017 Don't thank me, thank the wonderful guys (and maybe gals) that keep the BIKI and surrounding resources alive and healthy. I am just showing you the way, those people made it :) 1 Share this post Link to post Share on other sites
sarogahtyp 1108 Posted May 25, 2017 The core information in this thread is that triggers are propagated through the network and fire on any connected machine. Therefore u have to handle it with things like isServer or isDedicated or hasInterface.sent from mobile using Tapatalk Share this post Link to post Share on other sites
crewt 31 Posted May 25, 2017 Additionally there should be an additional option in triggers that limit execution on server side only Share this post Link to post Share on other sites