Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. *//*%FSM</HEAD>*/
  2. class FSM
  3. {
  4. fsmName = "Infected";
  5. class States
  6. {
  7. /*%FSM<STATE "found">*/
  8. class found
  9. {
  10. name = "found";
  11. 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
  12. " if (not isnull _victim) then {" \n
  13. " _pos = getposATL _victim;_target = (_this select 1);" \n
  14. " {" \n
  15. " if (alive _x) then {" \n
  16. " _xpos = getposATL _x;" \n
  17. " _x setdamage (damage _x);" \n
  18. " _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
  19. " _xanim = animationstate _x;" \n
  20. " if (_xanim != _attack_anim) then {" \n
  21. " if (_xpos distance _pos > 1) then {" \n
  22. " if (random 1 < 0.2) then {" \n
  23. " _x playMove (_anims select (random floor count _anims));" \n
  24. " };" \n
  25. " _dirto = [_xpos,_pos] call BIS_fnc_dirTo;" \n
  26. " _random = -12 + random 24;" \n
  27. " _x setDir (_dirTo + _random);" \n
  28. " } else {" \n
  29. " if ((vehicle _victim) != _victim) then {_x moveincargo (vehicle _victim);_x attachto [vehicle _victim, [0,0,0]];};" \n
  30. " _x playMove _attack_anim;" \n
  31. " [_x,_victim] spawn {" \n
  32. " sleep 0.5;ZAG = (_this select 1);publicvariable ""ZAG"";ZOG = (_this select 0);publicvariable ""ZOG"";" \n
  33. " if ((_this select 0) distance (_this select 1) < 1.5) then { " \n
  34. " ZOG say3d ""z_guts1""; [{[ZAG, .2, ""body"", ""stab""] call ace_medical_fnc_addDamageToUnit; },""BIS_fnc_spawn"",true,true] call BIS_fnc_MP;" \n
  35. " };" \n
  36. " };" \n
  37. " };" \n
  38. " } else {" \n
  39. " [_x, _xanim] spawn {" \n
  40. " sleep 2;" \n
  41. " if (animationstate (_this select 0) == (_this select 1)) then {" \n
  42. " (_this select 0) switchmove """";" \n
  43. " };" \n
  44. " };" \n
  45. " };" \n
  46. " };" \n
  47. " } foreach (units _group);" \n
  48. "} else {" \n
  49. " {" \n
  50. " _xanim = animationstate _x;" \n
  51. " if (_xanim in _all) then {" \n
  52. " _x switchmove """";" \n
  53. " };" \n
  54. " } foreach (units _group);" \n
  55. "};"/*%FSM</STATEINIT""">*/;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement