Sandbird Posted August 13, 2013 Report Share Posted August 13, 2013 How can i know in fn_selfActions.sqf if a player is in a Safezone ? In my mission.sqm file i got this to recognize safezones. class Item3 { position[]={11463.747,317.3078,11349.89}; a=140; b=140; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; text="Basis_East"; name="Basis_East"; expActiv="if (playerSide == WEST) then {[Basis_East] execVM ""safezone.sqf""};inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; And then in the safezone.sqf i can check : if (isNil "inSafezone") then { inSafezone = false; }; But inSafezone is not recognized in selfActions, so i cant use it in an if statement. Link to comment Share on other sites More sharing options...
0 maca134 Posted August 13, 2013 Report Share Posted August 13, 2013 Who's safezone script you using? looks like a mixture of mine and someone elses... Link to comment Share on other sites More sharing options...
0 Sandbird Posted August 13, 2013 Author Report Share Posted August 13, 2013 Yeah i was trying to mix it up in order to get that safezone value.....or at least i thought i could. The safezone script its calling is the one with : Private ["_Basis","_EH_Fired"]; ZombieDistance = 10; _Basis = _this select 0; not the insafezone one. EDIT: Could i do this ? In safezone.sqf give the player who is inside a variable: thePlayer = vehicle player; _playerLoc = thePlayer setVariable ["insafezone", 1, true]; and then in selfActions grab that variable ? _playerLoc = cursorTarget getVariable ["insafezone", false]; so _playerLoc says if they target player is inside a safezone ? Basically what i am trying to do is disable Knockout inside safezone areas. Link to comment Share on other sites More sharing options...
0 maca134 Posted August 13, 2013 Report Share Posted August 13, 2013 Hey, i have updated my safezone script with a fix to stop the infinite unconscious timer. http://dayzepoch.com/forum/index.php?/topic/1002-fixed-safezones/ Sandbird 1 Link to comment Share on other sites More sharing options...
0 Sandbird Posted August 14, 2013 Author Report Share Posted August 14, 2013 +bump. How can i detect fn_selfActions.sqf if a player is in safezone ? inSafeZone isn't getting recognized in fn_selfActions...and people abuse it in safezones. Link to comment Share on other sites More sharing options...
0 maca134 Posted August 14, 2013 Report Share Posted August 14, 2013 How do they abuse it? Link to comment Share on other sites More sharing options...
0 Sandbird Posted August 14, 2013 Author Report Share Posted August 14, 2013 they knockout players in safezone. I think i fixed it.....added a triger in knockout.sqf itself...to exit if in safezone and it recognizes the inSafezone there (i think). Link to comment Share on other sites More sharing options...
0 maca134 Posted August 14, 2013 Report Share Posted August 14, 2013 the inSafezone is client side, so u could disable the action if its true. Link to comment Share on other sites More sharing options...
0 Ferdinand das Frettchen Posted September 7, 2013 Report Share Posted September 7, 2013 anyone post what you exactly did ? Having the same problem! Link to comment Share on other sites More sharing options...
0 zydrahydra Posted September 8, 2013 Report Share Posted September 8, 2013 im not so long in arma scripting but when the safezone variable if (isNil "inSafezone") then { inSafezone = false; }; is global what it should be because it is an event i think you can do it like that if (isNil "inSafezone") then { inSafezone = false; }; if(!inSafezone) then { //YOUR KNOCKOUT CODE } But i dont test it so no prove Link to comment Share on other sites More sharing options...
Question
Sandbird
How can i know in fn_selfActions.sqf if a player is in a Safezone ?
In my mission.sqm file i got this to recognize safezones.
And then in the safezone.sqf i can check :
if (isNil "inSafezone") then {
inSafezone = false;
};
But inSafezone is not recognized in selfActions, so i cant use it in an if statement.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now