dimon 32 Posted May 20, 2015 (edited) How to get the corpse out of the car? {if (lifeState _x == "DEAD") then {moveOut _x}} forEach crew cursorTarget; not working ---------- Post added at 00:37 ---------- Previous post was at 23:41 ---------- wrote a crutch, but it doesn't make me happy :( _agent=createAgent [typeof player, getpos cursorTarget, [], 0, "NONE"]; _agent moveInDriver cursorTarget; moveout _agent; deletevehicle _agent =============================================================== First release version: fnc_takeoutthedeads Edited May 22, 2015 by Dimon Share this post Link to post Share on other sites
Joe98 92 Posted May 20, 2015 If an object has a name, you can move the object from anywhere to anywhere else. Place a box on the map. Name the box and name your object. Now create a trigger that moves the object to the box. blue1 setPos (getPos box1) Share this post Link to post Share on other sites
dimon 32 Posted May 20, 2015 If an object has a name, you can move the object from anywhere to anywhere else.Place a box on the map. Name the box and name your object. Now create a trigger that moves the object to the box. blue1 setPos (getPos box1) thank you, all is well: {if (lifeState _x == "DEAD") then {_x setpos (getpos player)}} forEach crew cursorTarget; Share this post Link to post Share on other sites
dreadedentity 278 Posted May 21, 2015 Dead enemies cannot do "actions", like getout. You have to actually move the object position like Joe98 suggested. Check this post I made a while ago for a video and some working code. Many improvements can be made, but I feel like this is a step in the right direction Share this post Link to post Share on other sites
dimon 32 Posted May 21, 2015 Dead enemies cannot do "actions", like getout. You have to actually move the object position like Joe98 suggested. Check this post I made a while ago for a video and some working code. Many improvements can be made, but I feel like this is a step in the right direction Very well, until I stopped at this stage Share this post Link to post Share on other sites
dimon 32 Posted May 21, 2015 (edited) In the MP is not so good... No idea what to do. [color="#FF8040"] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isServer[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#7A7A7A"]"CAr_troops"[/color] [color="#191970"][b]addPublicVariableEventHandler[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]spawn[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_veh[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_vehPos[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#1874CD"]_veh[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]lifeState[/b][/color] [color="#000000"]_x[/color] [color="#8B3E2F"][b]![/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#7A7A7A"]"HEALTHY"[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_deadPos[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]worldToModel[/b][/color] [color="#1874CD"]_vehPos[/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]_pos[/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]ASLToATL[/b][/color] [color="#191970"][b]getPosASL[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_deadPos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_pos[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_deadPos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#FF0000"]+2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_pos[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]abs[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_deadPos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#FF0000"]+2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_deadPos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_pos[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_deadPos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#FF0000"]+2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_pos[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]abs[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_deadPos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#FF0000"]+2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]_pos[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]2[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]setPosATL[/b][/color] [color="#000000"]_pos[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]crew[/b][/color] [color="#1874CD"]_veh[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]![/b][/color][color="#191970"][b]isServer[/b][/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#191970"][b]local[/b][/color] [color="#000000"]player[/color][color="#8B3E2F"][b])[/b][/color][color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]addAction[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'<t color=[color="#7A7A7A"]"#FF0000"[/color]>Ð’Ñ‹Ñ‚Ñнуть трупы</t>'[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]{[/b][/color] CAr_troops [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]publicVariableServer[/b][/color] [color="#7A7A7A"]"CAr_troops"[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]""[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]" {if(lifeState _x !='HEALTHY') exitWith {1};} count crew _target > 0"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]forEach[/b][/color] [color="#191970"][b]vehicles[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter Edited May 22, 2015 by Dimon Share this post Link to post Share on other sites
Joe98 92 Posted May 21, 2015 Write the script so that the bodies are placed on an object situated 1,000 meters away Share this post Link to post Share on other sites
dimon 32 Posted May 21, 2015 Write the script so that the bodies are placed on an object situated 1,000 meters away Sorry, but I don't understand what you mean... As it would not be strange, but the crutch _agent=createAgent ["O_crew_F", getpos _this, [], 0, "NONE"]; _agent moveInDriver _this; moveout _agent;deletevehicle _agent; visually works best: take out the driver ---------- Post added at 02:31 ---------- Previous post was at 00:58 ---------- If you do not know how to solve the problem - it can be avoided... [color="#FF8040"][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isServer[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] KK_fnc_commonTurrets [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_arr"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_trts"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_arr[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trts[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]configFile[/b][/color] [color="#8B3E2F"][b]/[/b][/color] [color="#7A7A7A"]"CfgVehicles"[/color] [color="#8B3E2F"][b]/[/b][/color] [color="#191970"][b]typeOf[/b][/color] [color="#000000"]_this[/color] [color="#8B3E2F"][b]/[/b][/color] [color="#7A7A7A"]"Turrets"[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#191970"][b]count[/b][/color] [color="#1874CD"]_trts[/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_arr[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_arr[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_i[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_j"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color] [color="#1874CD"]_trts[/color] [color="#8B3E2F"][b]/[/b][/color] [color="#191970"][b]configName[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_trts[/color] [color="#191970"][b]select[/b][/color] [color="#1874CD"]_i[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]/[/b][/color] [color="#7A7A7A"]"Turrets"[/color] [color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_arr[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_arr[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_i[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_j[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_arr[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#7A7A7A"]"CAr_troops"[/color] [color="#191970"][b]addPublicVariableEventHandler[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]spawn[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_crew[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getText[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]configFile[/b][/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"CfgVehicles"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#191970"][b]typeOf[/b][/color] [color="#000000"]_this[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"crew"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b]=[/b][/color][color="#191970"][b]createAgent[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_crew[/color][color="#8B3E2F"][b],[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"NONE"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInDriver[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Commander"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInCommander[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Gunner"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInGunner[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Cargo"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_freeCargoPositions[/color][color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Cargo"[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#1874CD"]_freeCargoPositions[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInCargo[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_this[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_i[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_commonTurrets[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]call[/b][/color] KK_fnc_commonTurrets[color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_commonTurrets[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInTurret[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_this[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#1874CD"]_commonTurrets[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]deleteVehicle[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]![/b][/color][color="#191970"][b]isServer[/b][/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#191970"][b]local[/b][/color] [color="#000000"]player[/color][color="#8B3E2F"][b])[/b][/color][color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]addAction[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'<t color=[color="#7A7A7A"]"#FF0000"[/color]>Ð’Ñ‹Ñ‚Ñнуть трупы</t>'[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]{[/b][/color] CAr_troops [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]publicVariableServer[/b][/color] [color="#7A7A7A"]"CAr_troops"[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]""[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]" {if(lifeState _x !='HEALTHY') exitWith {1};} count crew _target > 0"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]forEach[/b][/color] [color="#191970"][b]vehicles[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter ---------- Post added at 02:58 ---------- Previous post was at 02:31 ---------- with a pause [color="#FF8040"][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isServer[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] KK_fnc_commonTurrets [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_arr"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_trts"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_arr[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_trts[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]configFile[/b][/color] [color="#8B3E2F"][b]/[/b][/color] [color="#7A7A7A"]"CfgVehicles"[/color] [color="#8B3E2F"][b]/[/b][/color] [color="#191970"][b]typeOf[/b][/color] [color="#000000"]_this[/color] [color="#8B3E2F"][b]/[/b][/color] [color="#7A7A7A"]"Turrets"[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#191970"][b]count[/b][/color] [color="#1874CD"]_trts[/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_arr[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_arr[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_i[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_j"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color] [color="#1874CD"]_trts[/color] [color="#8B3E2F"][b]/[/b][/color] [color="#191970"][b]configName[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_trts[/color] [color="#191970"][b]select[/b][/color] [color="#1874CD"]_i[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]/[/b][/color] [color="#7A7A7A"]"Turrets"[/color] [color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_arr[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_arr[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_i[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_j[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_arr[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#7A7A7A"]"CAr_troops"[/color] [color="#191970"][b]addPublicVariableEventHandler[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]spawn[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_crew[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getText[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]configFile[/b][/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"CfgVehicles"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#191970"][b]typeOf[/b][/color] [color="#000000"]_this[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"crew"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b]=[/b][/color][color="#191970"][b]createAgent[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_crew[/color][color="#8B3E2F"][b],[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"NONE"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]hideObjectGlobal[/b][/color] [color="#000000"]true[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInDriver[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1000[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Commander"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInCommander[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1000[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Gunner"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInGunner[/b][/color] [color="#000000"]_this[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1000[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Cargo"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_freeCargoPositions[/color][color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]emptyPositions[/b][/color] [color="#7A7A7A"]"Cargo"[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]0[/color] [color="#191970"][b]to[/b][/color] [color="#1874CD"]_freeCargoPositions[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInCargo[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_this[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_i[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1000[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_commonTurrets[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]call[/b][/color] KK_fnc_commonTurrets[color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_commonTurrets[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]>[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]moveInTurret[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_this[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]moveOut[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_agent[/color] [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1000[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#1874CD"]_commonTurrets[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]deleteVehicle[/b][/color] [color="#1874CD"]_agent[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]![/b][/color][color="#191970"][b]isServer[/b][/color] [color="#8B3E2F"][b]|[/b][/color][color="#8B3E2F"][b]|[/b][/color] [color="#191970"][b]local[/b][/color] [color="#000000"]player[/color][color="#8B3E2F"][b])[/b][/color][color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]addAction[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'<t color=[color="#7A7A7A"]"#FF0000"[/color]>Ð’Ñ‹Ñ‚Ñнуть трупы</t>'[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]{[/b][/color] CAr_troops [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]publicVariableServer[/b][/color] [color="#7A7A7A"]"CAr_troops"[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]""[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]" {if(lifeState _x !='HEALTHY') exitWith {1};} count crew _target > 0"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]forEach[/b][/color] [color="#191970"][b]vehicles[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter Share this post Link to post Share on other sites
dimon 32 Posted May 22, 2015 Where to get ready progressbar for ACE as an example? Share this post Link to post Share on other sites
dimon 32 Posted May 22, 2015 (edited) First release version: fnc_takeoutthedeads Edited May 22, 2015 by Dimon Share this post Link to post Share on other sites
dimon 32 Posted May 25, 2015 help solve the problem with turrets in MP: the unit returns to his place :( Share this post Link to post Share on other sites