Search the Community
Showing results for tags 'help requested'.
Found 1 result
-
Variables for Triggers in Multiplayer Mission File
EveMakya posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey all, I'm relatively new to Arma 3 scripting and have run into an issue. I recently figured out that I could activate triggers synced to show/hide modules with a variable set with an add-action, essentially allowing me to control entire swaths of triggers with a button press, something I have found to be far more reliable than triggers activated by the physical presence of a unit. What I have is a set of triggers that simply have the variable and a semi-colon: StageOneActivated; And then with an add-action added with an init.sqf, I have: Controller addAction [ "Begin Phase One", {StageOneActivated = true; Controller removeAction (_this select 2); }]; Which sets the StageOneActivated to true which activates the trigger and removes the now-useless addaction from the list. Both locally and testing in local multiplayer via LAN this works flawlessly, but on the server the triggers simply don't respond. I know the init.sqf is working because the addAction's are present. And I know the addAction is working because it's removing the addaction after use. This implies the variables are whats not working correctly. I went into my init.sqf and decided to call the variables on mission start and set them, so I have the line: StageOneActivated = False; This has made no impact, neither in the locally tested version which still works, nor on the server which still fails. I've read through the documentation on global variables and I think this is probably what I need to do: to call the variables globally in the MP mission but I am struggling with the syntax. Do I just add publicVariable "StageOneActivated"; to the init.sqf after the line where I set the variable state as StageOneActivated = false; or do I need to call the public variable in the add-action as well? or is there another way to name and set these variables that I am missing entirely? Any help is appreciated. I want to start using variables more to really add some oomph into my missions and this is something that is going to come up a LOT.- 1 reply
-
- help requested
- variables
-
(and 4 more)
Tagged with: