Ok, I'm having some issues on this script here:
Code:
if (isServer) then {
tsk1 = player createSimpleTask ["DESTROY"];
tsk1 setSimpleTaskDescription ["Destroy the BMP3!", "DESTROY", "DESTROY"];
tsk1 setSimpleTaskDestination (getMarkerPos "bmp_2");
player setCurrentTask tsk1;
tsk1 setTaskState "CREATED";
[tsk1] call mk_fTaskHint;
0 = [markerPos "bmp_1", "Infantry", 50, ["BIS_TK_INS"]] execVM "crB_scripts\crB_taskPatrol.sqf";
0 = [markerPos "bmp_3", "Mechanized", 50, ["BIS_TK_INS"]] execVM "crB_scripts\crB_taskPatrol.sqf";
_veh = createVehicle ["BMP3", getMarkerPos "bmp", [], 0, "NONE"];
_trgc_1 = createTrigger["EmptyDetector", getMarkerPos "bmp_4"];
_trgc_1 setTriggerArea[500,500,0,false];
_trgc_1 setTriggerActivation["EAST","NOT PRESENT",false];
_trgc_1 setTriggerStatements["this","hint "Area CLEAR"",""];
_trgc_2 = createTrigger["EmptyDetector", getMarkerPos "bmp_5"];
_trgc_2 setTriggerArea[0,0,0,false];
_trgc_2 setTriggerActivation["NONE","PRESENT",false];
_trgc_2 setTriggerStatements["!(alive _veh)","hint "BMP DESTROYED"",""];
waitUntil {!alive _veh};
tsk1 setTaskState "SUCCEEDED";
[tsk1] call mk_fTaskHint;
sleep 5;
hint "OBJECTIVE COMPLETE";
};
I'm currently testing it with a radio trigger, I see the task hint pop-up but no-one else that is on the server I'm hosting on my computer can see it! Also not all of the AI are spawning in as well, oh and the triggers don't seem to fire either, even though the area is clear of all enemies! I've placed empty markers where all of these objects are spawning so that shouldn't be the problem.
I've also tried this with the script:
Code:
if (!isServer) exitWith {};
Any idea's whats going on?
Thanks in advance.
-Bigshot
EDIT: The first example using if (isServer) then {}; yields the script not running at all! The other one if (!isServer) exitwith {}; results in me (the server host) only seeing the task pop-up and not the rest of my clients