/*%FSM*/ /*%FSM*/ /* item0[] = {"init",0,250,-125.000000,-125.000000,-25.000000,-75.000000,0.000000,"init"}; item1[] = {"create_telelport",2,250,200.000000,-125.000000,300.000000,-75.000000,0.000000,"create telelport"}; item2[] = {"wait",4,218,200.000000,0.000000,300.000000,50.000000,0.000000,"wait"}; item3[] = {"_",8,218,50.000000,-125.000000,150.000000,-75.000000,0.000000,""}; item4[] = {"end",1,250,50.000000,0.000000,150.000000,50.000000,0.000000,"end"}; item5[] = {"do_teleport",2,4346,200.000000,125.000000,300.000000,175.000000,0.000000,"do teleport"}; item6[] = {"wait",4,218,50.000000,125.000000,150.000000,175.000000,0.000000,"wait"}; item7[] = {"end_teleport",2,250,-125.000000,125.000000,-25.000000,175.000000,0.000000,"end teleport"}; item8[] = {"_",8,218,-125.000000,0.000000,-25.000000,50.000000,0.000000,""}; link0[] = {0,3}; link1[] = {1,2}; link2[] = {2,5}; link3[] = {3,1}; link4[] = {5,6}; link5[] = {6,7}; link6[] = {7,8}; link7[] = {8,4}; globals[] = {25.000000,1,0,0,16777215,640,480,1,273,6316128,1,-305.318909,573.741272,405.862030,-267.499969,952,731,1}; window[] = {2,-1,-1,-1,-1,675,150,1175,150,3,970}; *//*%FSM*/ class FSM { fsmName = "cloak teleport"; class States { /*%FSM*/ class init { name = "init"; init = /*%FSM*/"_unit = _this select 0;" \n "_trgt = _this select 1;" \n "_t = diag_tickTime;" \n "" \n "//systemChat ""TELEPORT"";" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="create_telelport"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class create_telelport { name = "create_telelport"; init = /*%FSM*/"_unit allowDamage false;" \n "" \n "_flame = ""#particlesource"" createVehicleLocal getPosATL _unit;" \n "_flame setParticleClass ""ObjectDestructionFire2SmallxB"";" \n "_flame attachto [_unit,[0,0,0]];" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class wait { priority = 0.000000; to="do_teleport"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"diag_tickTime - _t > 1.5"/*%FSM*/; action=/*%FSM*/"_t = diag_tickTime;"/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class end { name = "end"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class do_teleport { name = "do_teleport"; init = /*%FSM*/"" \n "_dirBehind = (getDir _trgt) - (floor (random 40)+160);" \n "if (_dirBehind<0) then {_dirBehind=_dirBehind+360;};" \n "_dist = (_unit distance _trgt) max 12;" \n "" \n "_relPos = [_trgt,_dist, _dirBehind] call BIS_fnc_relPos;" \n "" \n "_cloakMoveTo = _relPos findEmptyPosition [0,(random 24) + 18,typeOf _unit];" \n "" \n "_unit setPos _cloakMoveTo;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class wait { priority = 0.000000; to="end_teleport"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"diag_tickTime - _t > 0.5"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class end_teleport { name = "end_teleport"; init = /*%FSM*/"deleteVehicle _flame;" \n "_unit allowDamage true;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="end"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="init"; finalStates[] = { "end", }; }; /*%FSM*/