Expecting too much from a 10yo engine.
Ok, ill take your advice on the Iserver code you provided earlier, sounds good
As for the advanced conditions regarding the tanks, maybe i'd have to look in setfuel > # or setdamage <# instead to make it better accomplishable.
But i expect that setdamage wont really work with ACE right? (armor system etc)
Just fyi, the mission im building is meant to be a template for a new original PVP concept/serie. Once the website and project have been released i'll let you know.
"if (fuel object != 0) then {...};" for "I still have some fuel left".
damage object isn't working for vehicles in ACE. It always returns 0 when not totally destroyed, and 1 when completely destroyed (Say, hitting a tank multiple times to engine and wait until it is all black).
Ok, i tried this and tested it both SP editor and on new created MP session on my comp but both tests failed.
The new trigger was not created or was not working. Any idea what could be wrong?
This is my init.sqf.
- Red1 is how i intend the created trigger to be named.
- Red1marker is a ellipse marker placed on map via editor.
Code:setViewDistance 4000; enableSaving [false, false]; if (isServer) then { red1 = createTrigger ["EmptyDetector", getMarkerPos "red1marker"]; red1 setTriggerArea [100, 80, 0, false]; red1 setTriggerActivation ["OPFOR", "PRESENT", true]; red1 setTriggerType "SWITCH"; red1 setTriggerText "text on"; red1 setTriggerStatements ["{_x iskindof 'T90' && canmove _x && canfire _x && ({_x iskindof 'RU_Soldier_Crew' && alive _x} count crew _x >= 2)} count thislist >= 2", "red1done=1, hint 'red1 is on',red1marker setMarkerBrush 'SOLID'", "red1done=0, hint 'red1 is off',red1marker setMarkerBrush 'Border'"]; red1 setTriggerTimeout [10, 10, 10, true]; }; waitUntil {alive player}; player addEventHandler ["Killed", {[_this select 0] spawn {hideBody (_this select 0)}}];
There is no "OPFOR" side, it's "EAST".
I've been working on a scripted solution for this - I think I've finally cracked it. A fun puzzle to work on, definitely the most complicated thing I have written for ArmA so far
Place a named trigger (e.g. tanktrigger1) to define the area to be captured, then from anywhere:
This is tankchecker.sqf:PHP Code:nul = [tanktrigger1] execvm "tankchecker.sqf";
PHP Code:_trigger = _this select 0;
_trigger setVariable ["captured", false, true];
while {true} do {
scopename "tankchecker";
if (({_x iskindof "T90" && canmove _x && canfire _x && ({_x iskindof "RU_Soldier_Crew" && alive _x} count crew _x >= 2)} count (list _trigger)) >= 2) then {
if !(_trigger getVariable "captured") then {
_trigger setVariable ["time", time, true];
hint format ["Tanks began to capture %1",_trigger];
while {_timer = (time - (_trigger getVariable "time"));_timer < 300} do {
if (({_x iskindof "T90" && canmove _x && canfire _x && ({_x iskindof "RU_Soldier_Crew" && alive _x} count crew _x >= 2)} count (list _trigger)) < 2) then {
hint format ["Tanks failed to capture %1",_trigger];
breakTo "tankchecker";
};
sleep 5;
};
_trigger setVariable ["captured", true, true];
hint format ["%1 was captured after five minutes.",_trigger];
breakTo "tankchecker";
};
} else {
if (_trigger getVariable "captured") then {hint format ["%1 was lost.",_trigger];};
_trigger setVariable ["captured", false, true];
sleep 5;
breakTo "tankchecker";
};
};