Epoch/Sources/epoch_code/System/cloakHover.fsm

143 lines
4.9 KiB
Plaintext
Raw Normal View History

2015-09-14 20:55:36 +00:00
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, cloak hover">*/
/*%FSM<HEAD>*/
/*
item0[] = {"hover",0,250,50.000000,-225.000000,150.000000,-175.000000,0.000000,"hover"};
item1[] = {"check",2,250,50.000000,-25.000000,150.000000,25.000000,0.000000,"check"};
item2[] = {"teleport",2,250,200.000000,75.000000,300.000000,125.000000,0.000000,"teleport"};
item3[] = {"done",4,218,200.000000,-125.000000,300.000000,-75.000000,0.000000,"done"};
item4[] = {"arrived",4,218,50.000000,75.000000,150.000000,125.000000,20.000000,"arrived"};
item5[] = {"end",1,250,200.000000,-225.000000,300.000000,-175.000000,0.000000,"end"};
item6[] = {"fly",4,4314,200.000000,-25.000000,300.000000,25.000000,10.000000,"fly"};
item7[] = {"wait",4,218,50.000000,-125.000000,150.000000,-75.000000,0.000000,"wait"};
link0[] = {0,7};
link1[] = {1,4};
link2[] = {1,6};
link3[] = {2,3};
link4[] = {3,5};
link5[] = {4,2};
link6[] = {6,1};
link7[] = {7,1};
globals[] = {25.000000,1,0,0,16777215,640,480,1,269,6316128,1,-183.182861,521.735474,304.026001,-397.056030,735,895,1};
window[] = {2,-1,-1,-1,-1,700,1775,2800,175,3,753};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "cloak hover";
class States
{
/*%FSM<STATE "hover">*/
class hover
{
name = "hover";
init = /*%FSM<STATEINIT""">*/"_unit = _this select 0;" \n
"_trgt = _this select 1;" \n
"_t = diag_tickTime;" \n
"_unit setUnitPos ""UP""; " \n
"" \n
"" \n
"_cloakDirTo = [_unit, _trgt] call BIS_fnc_dirTo;" \n
"_unit setDir _cloakDirTo;" \n
"" \n
"_unit say3D ""cultist_laugh"";" \n
"EPOCH_say3D_PVS = [player, _unit, 8,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "wait">*/
class wait
{
priority = 0.000000;
to="check";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"diag_tickTime - _t > 0.75"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_t = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "check">*/
class check
{
name = "check";
init = /*%FSM<STATEINIT""">*/"_dist = _trgt distance _unit;" \n
"_height = (getPosATL _trgt) select 2;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "arrived">*/
class arrived
{
priority = 20.000000;
to="teleport";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(getPosATL _unit select 2) > _height || _dist < 1.5;" \n
""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "fly">*/
class fly
{
priority = 10.000000;
to="check";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"" \n
"_arr = [getPosASL _unit, getPosASL _trgt, velocity _unit, velocity _trgt, vectorDir _unit, vectorDir _unit, vectorUp _unit, vectorUp _trgt, 0.1];" \n
"_unit setVelocityTransformation _arr;" \n
"" \n
"" \n
"_t = diag_tickTime;" \n
"" \n
"//systemchat format [""fly: %1"",getPosATL _unit];"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "teleport">*/
class teleport
{
name = "teleport";
init = /*%FSM<STATEINIT""">*/"[_unit, _trgt] execFSM ""\x\addons\a3_epoch_code\System\cloakTeleport.fsm"";"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "done">*/
class done
{
priority = 0.000000;
to="end";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "end">*/
class end
{
name = "end";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
};
initState="hover";
finalStates[] =
{
"end",
};
};
/*%FSM</COMPILE>*/