Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *//*%FSM</HEAD>*/
- class FSM
- {
- fsmName = "Infected";
- class States
- {
- /*%FSM<STATE "found">*/
- class found
- {
- name = "found";
- init = /*%FSM<STATEINIT""">*/"_victim = (leader _group) findNearestEnemy (leader _group);if (isnull _victim) then {{ if (isplayer _x && _x distance (leader _group) < 2900 && _x distance specpen > 500) then {_victim = _x;_target = _x;};} foreach playableunits;};" \n
- " if (not isnull _victim) then {" \n
- " _pos = getposATL _victim;_target = (_this select 1);" \n
- " {" \n
- " if (alive _x) then {" \n
- " _xpos = getposATL _x;" \n
- " _x setdamage (damage _x);" \n
- " _x setposATL _xpos;if (_victim != _target && random 1 < .05 && _x distance (vehicle _victim) < 3.5 && vehicle _victim != _victim) then {_x moveincargo (vehicle _victim);if (isplayer (vehicle (_victim)))then {(_this select 0) say3d ""z_guts1"";};};" \n
- " _xanim = animationstate _x;" \n
- " if (_xanim != _attack_anim) then {" \n
- " if (_xpos distance _pos > 1) then {" \n
- " if (random 1 < 0.2) then {" \n
- " _x playMove (_anims select (random floor count _anims));" \n
- " };" \n
- " _dirto = [_xpos,_pos] call BIS_fnc_dirTo;" \n
- " _random = -12 + random 24;" \n
- " _x setDir (_dirTo + _random);" \n
- " } else {" \n
- " if ((vehicle _victim) != _victim) then {_x moveincargo (vehicle _victim);_x attachto [vehicle _victim, [0,0,0]];};" \n
- " _x playMove _attack_anim;" \n
- " [_x,_victim] spawn {" \n
- " sleep 0.5;ZAG = (_this select 1);publicvariable ""ZAG"";ZOG = (_this select 0);publicvariable ""ZOG"";" \n
- " if ((_this select 0) distance (_this select 1) < 1.5) then { " \n
- " ZOG say3d ""z_guts1""; [{[ZAG, .2, ""body"", ""stab""] call ace_medical_fnc_addDamageToUnit; },""BIS_fnc_spawn"",true,true] call BIS_fnc_MP;" \n
- " };" \n
- " };" \n
- " };" \n
- " } else {" \n
- " [_x, _xanim] spawn {" \n
- " sleep 2;" \n
- " if (animationstate (_this select 0) == (_this select 1)) then {" \n
- " (_this select 0) switchmove """";" \n
- " };" \n
- " };" \n
- " };" \n
- " };" \n
- " } foreach (units _group);" \n
- "} else {" \n
- " {" \n
- " _xanim = animationstate _x;" \n
- " if (_xanim in _all) then {" \n
- " _x switchmove """";" \n
- " };" \n
- " } foreach (units _group);" \n
- "};"/*%FSM</STATEINIT""">*/;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement