Search the Community
Showing results for tags 'lifestate'.
Found 1 result
-
Animations & Lifestate in Multiplayer
lawman_actual posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
As part of a multiplayer mission, there's a downed AAF pilot. The unit is setUnconscious, and had a "revive" option. Here is it's .init: if isServer then {this setUnconscious true;}; this addAction [ "<t color='#B70000'>Revive</t>", { _help = [_this select 0,_this select 1] execVM "law\pilotRevive.sqf"; pilotRevive = true; }, "",0,true,true,"","(side _this == west) && (lifeState _target == 'INCAPACITATED')",3 ]; pilotRevive.sqf the following. params [["_casualty",objNull],["_caller",objNull]]; if ((isNUll _caller) || (isNUll _casualty)) exitWith {}; if (isMultiplayer) then { (_caller) playMove "AinvPknlMstpSnonWnonDnon_medic0"; sleep 5; (_casualty) setUnconscious false; (_casualty) playMove "AinjPpneMstpSnonWnonDnon_rolltofront"; sleep 4; //was 3 (_casualty) playMove "AmovPpneMstpSnonWnonDnon_AmovPercMstpSnonWnonDnon"; sleep 5.25; //was 1.25 [_casualty,""] remoteExec ["switchMove",0,true]; (_casualty) enableAI "ALL"; (_casualty) setUnitPos "UP"; (_casualty) setHit ["legs", 1]; (_casualty) doMove [6675.358,11257.388,0]; sleep 2; (leader group (_caller)) groupChat "The pilot thanks us."; sleep 3; (leader group (_caller)) groupChat "He says we can go. He will radio for CasEvac."; sleep 1; } else { (_caller) playMove "AinvPknlMstpSnonWnonDnon_medic0"; sleep 5; (_casualty) setUnconscious false; (_casualty) playMove "AinjPpneMstpSnonWnonDnon_rolltofront"; sleep 4; (_casualty) playMove "AmovPpneMstpSnonWnonDnon_AmovPercMstpSnonWnonDnon"; sleep 5; (_casualty) switchMove ""; (_casualty) enableAI "ALL"; (_casualty) setUnitPos "UP"; (_casualty) setHit ["legs", 1]; (_casualty) doMove [6675.358,11257.388,0]; sleep 2; (leader group (_caller)) groupChat "The pilot thanks us."; sleep 3; (leader group (_caller)) groupChat "He says we can go. He will radio for CasEvac."; sleep 1; }; The events work fine in singleplayer; the unit rolls over, gets up and hobbles to the position with his injured leg. In multiplayer, he currently goes from down to up with no transition, and his lifestate remains unconscious. I think i'm not really understanding what needs to be executed where here. I tried executing the playMove's on each client before but I was getting reports that the unit was getting stuck in a loop of different animations and ultimately ended up still lying face down. But then I saw that playMove has a global effect, so I stopped executing it on all clients. Except now the intermediate actions all seem to be having no effect, and the sleep commands didn't seem to appear. Help would be much appreciated, since I can only test this properly on the community test server which is a pain to keep doing. Thanks, Law- 3 replies
-
- animations
- lifestate
-
(and 4 more)
Tagged with: