Squirtman 5 Posted May 14, 2017 As the title states I was wondering if the triggers created in the editor are local or global. Also is there a way to make the trigger be the opposite of it's default within the editor. I know you can specify whether you want a trigger to be local or global when using createTrigger. Thanks in advance for your assitance. Share this post Link to post Share on other sites
7erra 629 Posted May 14, 2017 Triggers in editor are global. To make a trigger local you'd have to create one. Eg: Place a gamelogic and in the init field: _trg = createTrigger ["EmptyDetector", getPos this, false]; _trg setTriggerActivation ........ // and so on Share this post Link to post Share on other sites
mrcurry 522 Posted May 14, 2017 I'll also add that while "global" triggers are indeed created on each machine their states can vary from client to client. Example: trigger with condition "player in thisList" will only activate when THE player enters. Think of a global trigger as lots of network copies rather than a single entity. Share this post Link to post Share on other sites
Belbo 462 Posted May 14, 2017 Triggers are not really global, just as mrcurry explained. They are local to each client and the server. That means, if one client fulfills the condition of a trigger, the code will be executed locally on the client. The triggers on the other clients will still wait for their condition to return true. If the commands in the on Act.-field have global effect, they can pretty much mess up your whole mission - think of 5 clients who fulfill the same condition at the same time -> the trigger will execute the global command five times. The makeGlobal parameter in createTrigger only creates copies of the trigger on all clients and the server. You can however nowadays set triggers to be server only in the editor - this way they are local to the server only and the code, if the condition is fulfilled, will only be executed locally on the server. If you ask if a trigger can "be the opposite of it's default within the editor.", do you mean the condition of the trigger or it's locality? Share this post Link to post Share on other sites
pierremgi 4944 Posted May 14, 2017 Then, you can script for some project like: "marking the position of a player triggering a "radio Alpha" ". Share this post Link to post Share on other sites
Squirtman 5 Posted May 17, 2017 Thank you for your answers people. it's is much appreciated and helps a lot . On 5/14/2017 at 5:47 PM, belbo said: You can however nowadays set triggers to be server only in the editor - this way they are local to the server only and the code, if the condition is fulfilled, will only be executed locally on the server. If you ask if a trigger can "be the opposite of it's default within the editor.", do you mean the condition of the trigger or it's locality? I was referring to locality however all the information provided has answered my questions. Share this post Link to post Share on other sites
Tankbuster 1747 Posted May 17, 2017 They aren't global, but they are local to everyone. :) PS, I'm not helping, am I? 1 Share this post Link to post Share on other sites