Coolinator 10 Posted December 8, 2014 (edited) How to make a (no damage) protection zone inside the trigger zone? I want to protect my empty vehicles and take no damage. So im planning to put a trigger on where the empty vehicles parked at, and inside the trigger zone there's no damage taken like no damage zone. I don't know what to do for the next step though :( Edited December 8, 2014 by Coolinator Share this post Link to post Share on other sites
jshock 513 Posted December 8, 2014 (edited) Condition: {_x isKindOf "Car"} count thisList > 0 onAct: { _x allowDamage false; } forEach thisList; onDeact: { if (_x isKindOf "Car" && {!(_x in thisList)}) then {_x allowDamage true;}; } forEach allUnits; My onDeact code may not be correct, kinda psuedo-ed it :p. Edited December 9, 2014 by JShock Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted December 8, 2014 (edited) Or to make it more efficient: [color=#FF8040][color=#1874CD]_trigger_safeZone[/color] [color=#8B3E2F][b]=[/b][/color] [color=#191970][b]createTrigger[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"EmptyDetector"[/color][color=#8B3E2F][b],[/b][/color] [color=#1874CD]_position[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerArea[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#FF0000]50[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]50[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]0[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]false[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#006400][i]//50m radius[/i][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerActivation[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"ANY"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"PRESENT"[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]true[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerStatements[/b][/color] [color=#8B3E2F][b][[/b][/color] [color=#7A7A7A]"this && {if(_x isKindOf 'Vehicle') exitWith {true}; false} count thisList isEqualTo 1"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"{_x allowDamage false;} forEach thisList"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"{_x allowDamage true;} forEach thisList"[/color] [color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [/color] Not suitable as JShock mentioned here. Edited December 8, 2014 by Heeeere's Johnny! Oops, did not read the full question Share this post Link to post Share on other sites
jshock 513 Posted December 8, 2014 Or to make it more efficient: [color="#FF8040"][color="#1874CD"]_trigger_safeZone[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createTrigger[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"EmptyDetector"[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_position[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trigger_safeZone[/color] [color="#191970"][b]setTriggerArea[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]50[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]50[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]//50m radius[/i][/color] [color="#1874CD"]_trigger_safeZone[/color] [color="#191970"][b]setTriggerActivation[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"ANY"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"PRESENT"[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]true[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trigger_safeZone[/color] [color="#191970"][b]setTriggerStatements[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"this && player in thisList"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"player allowDamage false"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"player allowDamage true"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Kudos to Killzone_Kid for his SQF to BBCode Converter. It's for whatever empty vehicles are within the list of the trigger, not players, that's the only issue :D. Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted December 8, 2014 Yepp, just saw that right after I sent my (now updated) post and properly read the question. I should invert the order I do that. XD Share this post Link to post Share on other sites
jshock 513 Posted December 8, 2014 The only problem I conceptually see with filtering with thisList in onDeact is that thisList is all the vehicles that met the condition of the trigger, so now all the vehicles that are within the trigger area would be allowDamage true? Or is thisList in onDeact now the list of vehicles that left the trigger area? #don'tUseTriggersAnymore Trigger wiki page states: The special variables thisList and this have the same meanings as they would in the On Activation block Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted December 8, 2014 (edited) [color=#FF8040][color=#1874CD]_trigger_safeZone[/color] [color=#8B3E2F][b]=[/b][/color] [color=#191970][b]createTrigger[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"EmptyDetector"[/color][color=#8B3E2F][b],[/b][/color] [color=#1874CD]_position[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerArea[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#FF0000]50[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]50[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]0[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]false[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#006400][i]//50m radius[/i][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerActivation[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"ANY"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"PRESENT"[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]true[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerStatements[/b][/color] [color=#8B3E2F][b][[/b][/color] [color=#7A7A7A]"this && {if(_x isKindOf 'Vehicle') exitWith {true}; false} count thisList isEqualTo 1"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage false; } forEach (thisList - allUnitsInTrigger); comment 'For all new units'; this setVariable ['allUnitsInTrigger', thisList]; "[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage true; } forEach (allUnitsInTrigger - thisList); comment 'For all leaving units'; this setVariable ['allUnitsInTrigger', thisList]; "[/color] [color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color][/color] No f**king clue if that works, but give it a try and report back, please. EDIT: Overhauled trigger statements as there were logical errors. Well, f**k. So, let's finally get this thing to work! *sigh* Edited December 9, 2014 by Heeeere's Johnny! All new Share this post Link to post Share on other sites
jshock 513 Posted December 8, 2014 Makes logical sense, I actually just tried a simple BLUFOR present, onAct: hint str (thisList), onDeact: hint str(thisList), the onAct fired properly, onDeact did and showed nothing, so thisList in onDeact may be undefined? Share this post Link to post Share on other sites
Coolinator 10 Posted December 8, 2014 [color=#FF8040][color=#1874CD]_trigger_safeZone[/color] [color=#8B3E2F][b]=[/b][/color] [color=#191970][b]createTrigger[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"EmptyDetector"[/color][color=#8B3E2F][b],[/b][/color] [color=#1874CD]_position[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerArea[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#FF0000]50[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]50[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]0[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]false[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#006400][i]//50m radius[/i][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerActivation[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"ANY"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"PRESENT"[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]true[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerStatements[/b][/color] [color=#8B3E2F][b][[/b][/color] [color=#7A7A7A]"this && {if(_x isKindOf 'Vehicle') exitWith {true}; false} count thisList isEqualTo 1"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"{ _x allowDamage false; _allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; _allUnitsInTrigger pushBack _x; this setVariable ['allUnitsInTrigger', _allUnitsInTrigger]; } forEach thisList"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" _allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage true; } forEach (_allUnitsInTrigger - thisList); this setVariable ['allUnitsInTrigger', thisList]; "[/color] [color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [/color] Kudos to Killzone_Kid for his SQF to BBCode Converter. No f**king clue if that works' date=' but give it a try and report back, please.[/quote'] how do i use this? do i just put in the trigger act? or do i need to call it as a script? Share this post Link to post Share on other sites
jshock 513 Posted December 8, 2014 Yeah to use Johnny's you will need to put it in a script and a the top where you see "_position" you will need to define that with whatever position you want the trigger to be at. Share this post Link to post Share on other sites
Coolinator 10 Posted December 8, 2014 i will try both methods jshock and johny, will be back later after i test them, and then i tell the results :) ---------- Post added at 23:33 ---------- Previous post was at 23:31 ---------- Yeah to use Johnny's you will need to put it in a script and a the top where you see "_position" you will need to define that with whatever position you want the trigger to be at. _position? like naming a trigger? or like actual coordinates? if it's coordinates i don't know how to do that. :/ ---------- Post added at 23:44 ---------- Previous post was at 23:33 ---------- I tested Jshock method, it did not work :( i planted explosive charge near the Zamak transprot truck, then blew it up, truck got destroyed. i also tried three different activations to "none" "anybody", and "csat". I don't know if it matters though. ---------- Post added at 23:55 ---------- Previous post was at 23:44 ---------- i still haven't tested johny method yet because im still not sure what to put for "_position". Im also confused what to put for the trigger. like for condition and activation, do i leave it empty? Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted December 8, 2014 If you create this trigger in the editor, do this: Double click on the map where you want the trigger to be at. That way, you won't worry about the position. Put this into the "condition" of your trigger: this && {if(_x isKindOf 'Vehicle') exitWith {true}; false} count thisList isEqualTo 1 Then, take this string and put it into the "onAct" of your trigger: _allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage false; } forEach (thisList - _allUnitsInTrigger); comment 'For all new units'; this setVariable ['allUnitsInTrigger', thisList]; Finally, take this string and put into the "onDeact" of your trigger: _allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage true; } forEach (_allUnitsInTrigger - thisList); comment 'For all leaving units'; this setVariable ['allUnitsInTrigger', thisList]; Set "activation" to "any" and below that click on "Repeatedly" and below that select "Present". If you do create it in a script file, simply copy paste my code (reload your page first as I did some changes) then "_position" can be any position you desire. You could geplace it by "getPos player" or by an array like "[1000, 10000, 0]"; Share this post Link to post Share on other sites
Coolinator 10 Posted December 9, 2014 (edited) If you create this trigger in the editor' date=' do this:Double click on the map where you want the trigger to be at. That way, you won't worry about the position. Put this into the "condition" of your trigger: this && {if(_x isKindOf 'Vehicle') exitWith {true}; false} count thisList isEqualTo 1 Then, take this string and put it into the "onAct" of your trigger: _allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage false; } forEach (thisList - _allUnitsInTrigger); comment 'For all new units'; this setVariable ['allUnitsInTrigger', thisList]; Finally, take this string and put into the "onDeact" of your trigger: _allUnitsInTrigger = this getVariable ['allUnitsInTrigger', []]; { _x allowDamage true; } forEach (_allUnitsInTrigger - thisList); comment 'For all leaving units'; this setVariable ['allUnitsInTrigger', thisList]; Set "activation" to "any" and below that click on "Repeatedly" and below that select "Present". If you do create it in a script file, simply copy paste my code (reload your page first as I did some changes) then "_position" can be any position you desire. You could geplace it by "getPos player" or by an array like "[1000, 10000, 0']"; i tried the trigger method, it keep saying "local variable in global space"? ---------- Post added at 00:17 ---------- Previous post was at 00:11 ---------- You could geplace it by "getPos player" or by an array like "[1000, 10000, 0]"; i don't know how to use getpos player or array [1000,1000,0]. Im really sorry im not a pro scripter :(, i really have no clue how to use those :/ ---------- Post added at 00:51 ---------- Previous post was at 00:17 ---------- Nvm guys, i found another way lol.. i may not be a pro scripter but i found simple ways lol or noob ways lol. :) What i did is make a really reallly tiny tinsy trigger, like about half size of the vehicle, then i place the trigger on the driver seat area or passenger area. Trigger set to "blufor", "once","this". i named vehicle "ct" and i put in vehicle init "ct allowdamage false"; trigger Act: ct allowdamage true; done :) thnx for your help guys, i really appreciate it :) Edited December 9, 2014 by Coolinator Share this post Link to post Share on other sites
jshock 513 Posted December 9, 2014 Well, when did this get down to only one vehicle? Myself and Johnny were having a bug testing fest with thisList as well as a hundred different ways of trying to accomplish this, with no luck thus far, but that was checking for all vehicles in a trigger area applying the necessary allowDamage, and then onDeact do the opposite, not just one vehicle, one vehicle is as easy as you just said above. Share this post Link to post Share on other sites
Coolinator 10 Posted December 9, 2014 (edited) Well, when did this get down to only one vehicle? Myself and Johnny were having a bug testing fest with thisList as well as a hundred different ways of trying to accomplish this, with no luck thus far, but that was checking for all vehicles in a trigger area applying the necessary allowDamage, and then onDeact do the opposite, not just one vehicle, one vehicle is as easy as you just said above. i just tested it with one vehicle only. but in my mission i have two empty vehicles parked close together. Im just gonna name the other vehicle "ct2", then do the same thing like i did with the first vehicle named "ct" :) also i forgot to include this is my previous post, i put "ct allowdamage false:" in my first vehicle init, named "ct" Edited December 9, 2014 by Coolinator Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted December 9, 2014 (edited) Whatever, this thing kept me from sleeping peacefully, so I couldn't help but finally geting this thing to work: [color=#FF8040][color=#1874CD]_trigger_safeZone[/color] [color=#8B3E2F][b]=[/b][/color] [color=#191970][b]createTrigger[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"EmptyDetector"[/color][color=#8B3E2F][b],[/b][/color] [color=#191970][b]getPosATL[/b][/color] [color=#000000]player[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerArea[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#FF0000]10[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]10[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]0[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]false[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerActivation[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"ANY"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"PRESENT"[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]true[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerStatements[/b][/color] [color=#8B3E2F][b][[/b][/color] [color=#7A7A7A]" thisTrigger setVariable ['thisListPrev', +(thisTrigger getVariable ['thisList', []])]; thisTrigger setVariable ['thisList', +thisList]; this && player in thisList && count thisList >= count (thisTrigger getVariable 'thisListPrev') "[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" { _x allowDamage false; } forEach thisList; "[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" comment 'thisListPrev < thisList'; { _x allowDamage true; } forEach ((thisTrigger getVariable ['thisListPrev', []]) - (thisTrigger getVariable ['thisList', []])); comment 'For all leaving units'; "[/color] [color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color][/color] Kudos to Killzone_Kid for his SQF to BBCode Converter. Edited December 9, 2014 by Heeeere's Johnny! Removed systemChat lines and altered the code to make it work without global variables Share this post Link to post Share on other sites
Coolinator 10 Posted December 9, 2014 Yeah to use Johnny's you will need to put it in a script and a the top where you see "_position" you will need to define that with whatever position you want the trigger to be at. Whatever' date=' this thing kept me from sleeping peacefully, so I couldn't help but finally geting this thing to work: [color=#FF8040][color=#1874CD]_trigger_safeZone[/color] [color=#8B3E2F][b]=[/b][/color] [color=#191970][b]createTrigger[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"EmptyDetector"[/color][color=#8B3E2F][b],[/b][/color] [color=#191970][b]getPosATL[/b][/color] [color=#000000]player[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerArea[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#FF0000]10[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]10[/color][color=#8B3E2F][b],[/b][/color] [color=#FF0000]0[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]false[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerActivation[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#7A7A7A]"ANY"[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]"PRESENT"[/color][color=#8B3E2F][b],[/b][/color] [color=#000000]true[/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] allUnitsInTrigger [color=#8B3E2F][b]=[/b][/color] [color=#8B3E2F][b][[/b][/color][color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color] [color=#1874CD]_trigger_safeZone[/color] [color=#191970][b]setTriggerStatements[/b][/color] [color=#8B3E2F][b][[/b][/color] [color=#7A7A7A]" allUnitsInTriggerPrev = +allUnitsInTrigger; allUnitsInTrigger = +thisList; comment 'Deactivate whenever in the current check, the number of units is smaller than in the last check'; this && player in thisList && count allUnitsInTrigger >= count allUnitsInTriggerPrev "[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" { _x allowDamage false; } forEach allUnitsInTrigger; "[/color][color=#8B3E2F][b],[/b][/color] [color=#7A7A7A]" comment 'thisListPrev < thisList'; { _x allowDamage true; } forEach (allUnitsInTriggerPrev - allUnitsInTrigger); comment 'For all leaving units'; "[/color] [color=#8B3E2F][b]][/b][/color][color=#8B3E2F][b];[/b][/color][/color] Kudos to Killzone_Kid for his SQF to BBCode Converter. Oh wow! Sorry for not making you sleep lol. I really appreciate for taking your time helping me:) I will try this out, but noob question, how do I initialize this? By trigger or by script or both? Share this post Link to post Share on other sites
jshock 513 Posted December 9, 2014 Ok, paste the entire thing into your init.sqf, for simplicity sake, then follow the below directions: //Make a marker on the map named "baseAreaMarker", place this marker in the center of your base area //Replace getPosATL player with getMarkerPos "baseAreaMarker" in the following line _trigger_safeZone = createTrigger ["EmptyDetector", getPosATL player]; //becomes _trigger_safeZone = createTrigger ["EmptyDetector", (getMarkerPos "baseAreaMarker")]; //In the following line replace each 10 with whatever you want the radius around the base to be (100m/200m/300m/etc.), it is currently a 10 meter radius _trigger_safeZone setTriggerArea [10, 10, 0, false]; //can become 100m circle with the below line _trigger_safeZone setTriggerArea [100, 100, 0, false]; And that should be all you need to do. Share this post Link to post Share on other sites
Coolinator 10 Posted December 9, 2014 Ok, paste the entire thing into your init.sqf, for simplicity sake, then follow the below directions: //Make a marker on the map named "baseAreaMarker", place this marker in the center of your base area //Replace getPosATL player with getMarkerPos "baseAreaMarker" in the following line _trigger_safeZone = createTrigger ["EmptyDetector", getPosATL player]; //becomes _trigger_safeZone = createTrigger ["EmptyDetector", (getMarkerPos "baseAreaMarker")]; //In the following line replace each 10 with whatever you want the radius around the base to be (100m/200m/300m/etc.), it is currently a 10 meter radius _trigger_safeZone setTriggerArea [10, 10, 0, false]; //can become 100m circle with the below line _trigger_safeZone setTriggerArea [100, 100, 0, false]; And that should be all you need to do. Ahh Thank you so much Jshock!!!!! :) the directions made it more easy to understand for a noob like me who barely understand scripting language lol :) Thank you so much to both of you!!! i really appreciate for the time you sacrifice and effort for helping me :) it means a lot :) Share this post Link to post Share on other sites
Persian MO 82 Posted December 9, 2014 I found this somewhere in forum.If you want to have a safe zone, it's easy. - put 2 marker on map, close to your vehicles, name them: mrk1, mrk2 - in your init.sqf _safe1 = getMarkerPos "mrk1"; "ProtectionZone_Invisible_F" createVehicle _safe1; _safe2 = getMarkerPos "mrk2"; "ProtectionZone_Invisible_F" createVehicle _safe2; thats it. Each marker covering about 25 meter area and you can add more markers. Share this post Link to post Share on other sites
jshock 513 Posted December 9, 2014 I found this somewhere in forum.If you want to have a safe zone, it's easy.- put 2 marker on map, close to your vehicles, name them: mrk1, mrk2 - in your init.sqf _safe1 = getMarkerPos "mrk1"; "ProtectionZone_Invisible_F" createVehicle _safe1; _safe2 = getMarkerPos "mrk2"; "ProtectionZone_Invisible_F" createVehicle _safe2; thats it. Each marker covering about 25 meter area and you can add more markers. The only problem I have with that is the expansive amounts of markers you would need to make, just to cover a larger area (i.e. a vehicle depot) and with Johnny's solution you just need one marker and to change the radius values to what you want. Because with only a 25m radius to mess with it would be hard to ensure an entire zone (let's say 300m radius) is properly covered. Share this post Link to post Share on other sites
Coolinator 10 Posted December 9, 2014 I found this somewhere in forum.If you want to have a safe zone, it's easy.- put 2 marker on map, close to your vehicles, name them: mrk1, mrk2 - in your init.sqf _safe1 = getMarkerPos "mrk1"; "ProtectionZone_Invisible_F" createVehicle _safe1; _safe2 = getMarkerPos "mrk2"; "ProtectionZone_Invisible_F" createVehicle _safe2; thats it. Each marker covering about 25 meter area and you can add more markers. Ooo thnx for sharing!!! I will definitely try this out :) Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted December 9, 2014 The only problem I have with that is the expansive amounts of markers you would need to make, just to cover a larger area (i.e. a vehicle depot) and with Johnny's solution you just need one marker and to change the radius values to what you want. Because with only a 25m radius to mess with it would be hard to ensure an entire zone (let's say 300m radius) is properly covered. A "ProtectionZone_F" or "ProtectionZone_Invisible_F" might fit most people's needs, but as JShock already mentioned, it's got a fixed size, plus it's always a circle. Using a trigger, you could make your safezone be a rectangle as well. I can imagine situations where this might be useful. Share this post Link to post Share on other sites
jshock 513 Posted December 9, 2014 A "ProtectionZone_F" or "ProtectionZone_Invisible_F" might fit most people's needs' date=' but as JShock already mentioned, it's got a fixed size, plus it's always a circle. Using a trigger, you could make your safezone be a rectangle as well. I can imagine situations where this might be useful.[/quote']And just to clarify, I'm not saying don't use Persian's idea, I'm just saying from a functionality standpoint it's very limited. Share this post Link to post Share on other sites
roby7979 1 Posted April 10, 2017 Wich one work for units and vehicles? Share this post Link to post Share on other sites