mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
153 lines
5.2 KiB
Plaintext
153 lines
5.2 KiB
Plaintext
|
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, cloak teleport">*/
|
||
|
/*%FSM<HEAD>*/
|
||
|
/*
|
||
|
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</HEAD>*/
|
||
|
class FSM
|
||
|
{
|
||
|
fsmName = "cloak teleport";
|
||
|
class States
|
||
|
{
|
||
|
/*%FSM<STATE "init">*/
|
||
|
class init
|
||
|
{
|
||
|
name = "init";
|
||
|
init = /*%FSM<STATEINIT""">*/"_unit = _this select 0;" \n
|
||
|
"_trgt = _this select 1;" \n
|
||
|
"_t = diag_tickTime;" \n
|
||
|
"" \n
|
||
|
"//systemChat ""TELEPORT"";" \n
|
||
|
"" \n
|
||
|
"" \n
|
||
|
""/*%FSM</STATEINIT""">*/;
|
||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||
|
class Links
|
||
|
{
|
||
|
/*%FSM<LINK "_">*/
|
||
|
class _
|
||
|
{
|
||
|
priority = 0.000000;
|
||
|
to="create_telelport";
|
||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||
|
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||
|
};
|
||
|
/*%FSM</LINK>*/
|
||
|
};
|
||
|
};
|
||
|
/*%FSM</STATE>*/
|
||
|
/*%FSM<STATE "create_telelport">*/
|
||
|
class create_telelport
|
||
|
{
|
||
|
name = "create_telelport";
|
||
|
init = /*%FSM<STATEINIT""">*/"_unit allowDamage false;" \n
|
||
|
"" \n
|
||
|
"_flame = ""#particlesource"" createVehicleLocal getPosATL _unit;" \n
|
||
|
"_flame setParticleClass ""ObjectDestructionFire2SmallxB"";" \n
|
||
|
"_flame attachto [_unit,[0,0,0]];" \n
|
||
|
""/*%FSM</STATEINIT""">*/;
|
||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||
|
class Links
|
||
|
{
|
||
|
/*%FSM<LINK "wait">*/
|
||
|
class wait
|
||
|
{
|
||
|
priority = 0.000000;
|
||
|
to="do_teleport";
|
||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||
|
condition=/*%FSM<CONDITION""">*/"diag_tickTime - _t > 1.5"/*%FSM</CONDITION""">*/;
|
||
|
action=/*%FSM<ACTION""">*/"_t = diag_tickTime;"/*%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>*/
|
||
|
/*%FSM<STATE "do_teleport">*/
|
||
|
class do_teleport
|
||
|
{
|
||
|
name = "do_teleport";
|
||
|
init = /*%FSM<STATEINIT""">*/"" \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</STATEINIT""">*/;
|
||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||
|
class Links
|
||
|
{
|
||
|
/*%FSM<LINK "wait">*/
|
||
|
class wait
|
||
|
{
|
||
|
priority = 0.000000;
|
||
|
to="end_teleport";
|
||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||
|
condition=/*%FSM<CONDITION""">*/"diag_tickTime - _t > 0.5"/*%FSM</CONDITION""">*/;
|
||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||
|
};
|
||
|
/*%FSM</LINK>*/
|
||
|
};
|
||
|
};
|
||
|
/*%FSM</STATE>*/
|
||
|
/*%FSM<STATE "end_teleport">*/
|
||
|
class end_teleport
|
||
|
{
|
||
|
name = "end_teleport";
|
||
|
init = /*%FSM<STATEINIT""">*/"deleteVehicle _flame;" \n
|
||
|
"_unit allowDamage true;"/*%FSM</STATEINIT""">*/;
|
||
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||
|
class Links
|
||
|
{
|
||
|
/*%FSM<LINK "_">*/
|
||
|
class _
|
||
|
{
|
||
|
priority = 0.000000;
|
||
|
to="end";
|
||
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||
|
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||
|
};
|
||
|
/*%FSM</LINK>*/
|
||
|
};
|
||
|
};
|
||
|
/*%FSM</STATE>*/
|
||
|
};
|
||
|
initState="init";
|
||
|
finalStates[] =
|
||
|
{
|
||
|
"end",
|
||
|
};
|
||
|
};
|
||
|
/*%FSM</COMPILE>*/
|