Jump to content
EthanRAA

Help with addAction and Sector control

Recommended Posts

I am needing some help on making a sector control, but to capture the point, you must perform an action (scroll wheel action, that is) on an object to start the capture. I've tried everything to my knowledge of scripting, but it is not very extensive.. Thanks in advance!

Share this post


Link to post
Share on other sites

I'm just a noob so what I can suggest just a simple script, just to show you how it could be done.
Place an object let's say a flag.... in it's init field :

this addAction ["Capture Me", "[_this, 1000] execVM ""captureMe.sqf"" "];



captureMe.sqf :


_theFlag = _this select 0;
_pos = getPos (_theFlag);
_range = _this select 1;


hint "Go make a coffee as this process took 10 minutes of real life time to complete"; sleep 5; hint "";
sleep 595;


_doomArea = createMarker ["Doom Area", _pos]; 
_doomArea setMarkerShape "ELLIPSE"; 
"Doom Area" setMarkerSize [_range, _range];
"Doom Area" setMarkerColor "ColorBlue"; 
"Doom Area" setMarkerText "This is my area, dont messed up with me, Ive warned you!";
"Doom Area" setMarkerBrush "SolidBorder";

_doomed = createTrigger ["EmptyDetector", _pos];
_doomed setTriggerArea [_range, _range, 0, false];
_doomed setTriggerActivation ["ANY", "PRESENT", false];
_doomed setTriggerStatements ["call {if (count thisList > 0) then {{if (([playerSide, side _x] call BIS_fnc_sideIsEnemy) && (alive _x)) then {_x setDamage 1}} forEach thisList}; false}", "", ""];

hint "Area captured, any enemy entering your beloved area will be doomed. Thanks for the coffee."; sleep 5; hint "";


Cheers :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×