Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About EAGLE__

  • Rank
  1. EAGLE__

    Option to Toggle Flag

    I've came up with a good system which works with multiple clients on a dedicated MP server. We placed the below code you provided us with inside the init of an invisible helipad. We then set the variable names of each flag we want to change to yourFlag1 etc. and made sure they were exactly the same inside the invisible helipad's init. The invisible helipad then executes the code and adds the option to "Use Tank Range" on each named flag. Using the option on yourFlag1 will also change yourFlag2 and yourFlag3, and vice versa. We've tested this on a dedicated MP client with other clients changing and it changes, and updates instantly for all of us. Thanks a bunch to @Grumpy Old Man for helping me with this! _flags = [yourFlag1,yourFlag2,yourFlag3]; { _x setVariable ["TAG_fnc_flags",_flags,true]; _ID = _x addAction ["Use Tank Range",{ params ["_object","_caller","_ID"]; _state = _object getVariable ["TAG_fnc_flagState",false]; _texts = ["Clear Tank Range","Use Tank Range"]; _textures = ["\A3\Data_F\Flags\Flag_red_CO.paa","\A3\Data_F\Flags\Flag_green_CO.paa"]; _flags = _object getVariable ["TAG_fnc_flags",[]]; { [_x,(_textures select _state)] remoteExec ["setFlagTexture",_x]; _x setUserActionText[_ID,_texts select _state]; _x setVariable ["TAG_fnc_flagState",!_state,true]; } forEach _flags; },[],1,true,true,"","_target distance2D _this < 3"]; [_x,"\A3\Data_F\Flags\Flag_green_CO.paa"] remoteExec ["setFlagTexture",_x]; } forEach _flags;
  2. EAGLE__

    Option to Toggle Flag

    My apologies for bumping. It's so simple but in the words of Todd "it just works". Thank you a lot for this. Would it be better to execute a remoteExec through init.sqf or can it remain in the flag init and still execute globally for all clients? Thanks
  3. EAGLE__

    Option to Toggle Flag

    I worked it out. Though I wonder if it's possible to execute multiple flags at once from one single flag? So Flag1 executes itself as well as Flag2 and Flag3 and vice versa, Flag2 executes itself and Flag1 and Flag3 etc. Also how would I ensure this runs globally? The script works, but only for the client who presses the option, the texture remains the same for other clients unless they press it themselves.
  4. EAGLE__

    Option to Toggle Flag

    Oh wow I thought this would be much more complicated! Where abouts would I put this, in my init.sqf or the init of the flag itself?
  5. EAGLE__

    Option to Toggle Flag

    Could you elaborate on how I would use this? Such as an example or a little more help?
  6. Hello. I've found similar posts which describe how to change a flag based on triggers, however, I'm looking for a script that changes the flag with a simple clicking option, for example, while a tank range is not being used, a green flag is displayed at the enterance, when someone enters the range to begin using it, they go up to the flag and toggle the flag, changing it to red and when finished, they can re-toggle it back to green, but with an option displayed when looking at the flag post, similar to the flag post teleportation system. Any help is much appreciated! Thanks!