Epoch/Sources/epoch_code/System/Phantom_Brain.fsm
2015-09-14 15:55:36 -05:00

632 lines
23 KiB
Plaintext

/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, phantom">*/
/*%FSM<HEAD>*/
/*
item0[] = {"phantom",0,4346,-50.000000,-325.000000,50.000000,-275.000000,0.000000,"phantom"};
item1[] = {"_",8,218,75.000000,-200.000000,125.000000,-175.000000,0.000000,""};
item2[] = {"instinct",2,250,150.000000,-200.000000,250.000000,-150.000000,0.000000,"instinct"};
item3[] = {"action",2,250,150.000000,-50.000000,250.000000,0.000000,0.000000,"action"};
item4[] = {"dispose",4,218,50.000000,-150.000000,150.000000,-100.000000,90.000000,"dispose"};
item5[] = {"_",8,218,175.000000,200.000000,225.000000,225.000000,0.000000,""};
item6[] = {"reset_vars",2,250,-50.000000,-200.000000,50.000000,-150.000000,0.000000,"reset vars"};
item7[] = {"_",8,218,-25.000000,-250.000000,25.000000,-225.000000,0.000000,""};
item8[] = {"complete",4,218,-50.000000,-125.000000,50.000000,-75.000000,100.000000,"complete"};
item9[] = {"end",1,250,400.000000,-100.000000,500.000000,-50.000000,0.000000,"end"};
item10[] = {"dispose",4,218,275.000000,-100.000000,375.000000,-50.000000,95.000000,"dispose"};
item11[] = {"instinct_done",4,218,150.000000,-125.000000,250.000000,-75.000000,100.000000,"instinct done"};
item12[] = {"door",4,218,-50.000000,25.000000,50.000000,75.000000,30.000000,"door"};
item13[] = {"phantom_door",2,250,-50.000000,175.000000,50.000000,225.000000,0.000000,"phantom door"};
item14[] = {"door",4,218,225.000000,-350.000000,325.000000,-300.000000,60.000000,"door"};
item15[] = {"appear",4,218,125.000000,-325.000000,225.000000,-275.000000,70.000000,"appear"};
item16[] = {"appear",4,218,75.000000,25.000000,175.000000,75.000000,10.000000,"appear"};
item17[] = {"do_apparition",2,250,75.000000,125.000000,175.000000,175.000000,0.000000,"do apparition"};
item18[] = {"bite",4,218,325.000000,-250.000000,425.000000,-200.000000,40.000000,"bite"};
item19[] = {"bite",4,218,225.000000,25.000000,325.000000,75.000000,20.000000,"bite"};
item20[] = {"do_bite",2,250,225.000000,125.000000,325.000000,175.000000,0.000000,"do bite"};
item21[] = {"checks",4,218,50.000000,-275.000000,150.000000,-225.000000,80.000000,"checks"};
item22[] = {"sound",4,218,275.000000,-300.000000,375.000000,-250.000000,50.000000,"sound"};
item23[] = {"sound",4,218,350.000000,25.000000,450.000000,75.000000,0.000000,"sound"};
item24[] = {"do_sound",2,250,350.000000,175.000000,450.000000,225.000000,0.000000,"do sound"};
item25[] = {"window",4,218,300.000000,-200.000000,400.000000,-150.000000,50.000000,"window"};
item26[] = {"window",4,218,-175.000000,25.000000,-75.000000,75.000000,30.000000,"window"};
item27[] = {"smash_window",2,250,-175.000000,250.000000,-75.000000,300.000000,0.000000,"smash window"};
link0[] = {0,7};
link1[] = {1,2};
link2[] = {2,4};
link3[] = {2,11};
link4[] = {2,14};
link5[] = {2,15};
link6[] = {2,18};
link7[] = {2,21};
link8[] = {2,22};
link9[] = {2,25};
link10[] = {3,8};
link11[] = {3,10};
link12[] = {3,12};
link13[] = {3,16};
link14[] = {3,19};
link15[] = {3,23};
link16[] = {3,26};
link17[] = {4,2};
link18[] = {5,3};
link19[] = {6,1};
link20[] = {7,6};
link21[] = {8,6};
link22[] = {10,9};
link23[] = {11,3};
link24[] = {12,13};
link25[] = {13,5};
link26[] = {14,2};
link27[] = {15,2};
link28[] = {16,17};
link29[] = {17,5};
link30[] = {18,2};
link31[] = {19,20};
link32[] = {20,5};
link33[] = {21,2};
link34[] = {22,2};
link35[] = {23,24};
link36[] = {24,5};
link37[] = {25,2};
link38[] = {26,27};
link39[] = {27,5};
globals[] = {25.000000,1,0,0,16777215,640,480,1,182,6316128,1,-249.798294,620.231628,477.075989,-365.297302,755,731,1};
window[] = {2,-1,-1,-1,-1,650,125,1150,125,3,773};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "phantom";
class States
{
/*%FSM<STATE "phantom">*/
class phantom
{
name = "phantom";
init = /*%FSM<STATEINIT""">*/"" \n
"//settings" \n
"_phantomLife = 884;" \n
"_phantomChance = 100;// Percentage of this figure to trigger haunting - Lower for more events" \n
"_haunting = 6;//Check every x ticks." \n
"" \n
"//vars" \n
"_plyr = player;" \n
"this = objNull;" \n
"_inHouse = false;" \n
"_tStart = diag_tickTime;" \n
"_callDispose = false;" \n
"_house = objNull;" \n
"" \n
"//doors" \n
"_doDoor = false;" \n
"_act = """";" \n
"_obj = objNull;" \n
"_numDoors = 0;" \n
"_house = """";" \n
"" \n
"//apparition" \n
"_doAppear = false;" \n
"_count = 0;" \n
"_object = objNull;" \n
"_source01 = objNull;" \n
"" \n
"//attack" \n
"_doBite = false;" \n
"" \n
"//Window" \n
"_doWindow = false;" \n
"" \n
"//Sound" \n
"_doSound = false;" \n
"_soundNames = [""concrete_int_walk"",""concrete_walk"",""debris_walk"",""dirt_walk_new"",""gravel_walk"",""metal_int_walk"",""metal_walk"",""new_dry_grass_walk"",""new_grass_walk"",""rock_walk"",""roof_tiles_walk"",""roof_tin_walk"",""sand_walk"",""steel_walk"",""stony_walk"",""tarmac_walk"",""tiles_int_walk"",""wood_walk_ext"",""wood_walk_int""];" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "instinct">*/
class instinct
{
name = "instinct";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "instinct_done">*/
class instinct_done
{
priority = 100.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_decisionMade;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_t = diag_tickTime;" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "dispose">*/
class dispose
{
priority = 90.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!alive _plyr || _callDispose;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doDispose = true;" \n
"_decisionMade = true;" \n
"_actionDone = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "checks">*/
class checks
{
priority = 80.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_decisionMade && diag_tickTime - _t > _haunting;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_posPlyr = visiblePosition player;" \n
"_house = nearestBuilding player;" \n
"_housePos = getPosATL _house;" \n
"_bound = boundingBox _house;" \n
" " \n
"_xBound = _bound select 1 select 0;" \n
"_yBound = _bound select 1 select 1;" \n
"_zBound = _bound select 1 select 2;" \n
" " \n
"_xBound = _xBound - ((_xBound / 100) * 16);" \n
"_yBound = _yBound - ((_yBound / 100) * 16);" \n
"_zBound = _zBound - ((_zBound / 100) * 16);" \n
" " \n
"_xDiff = abs ((_housePos select 0) - (_posPlyr select 0));" \n
"_yDiff = abs ((_housePos select 1) - (_posPlyr select 1));" \n
"_zDiff = abs ((_housePos select 2) - (_posPlyr select 2));" \n
"" \n
" " \n
"if (_xDiff < _xBound && _yDiff < _yBound && _zDiff < _zBound) then {" \n
"_inHouse = true;" \n
"}else{" \n
"_inHouse = false;" \n
"};" \n
"" \n
"" \n
"if (diag_tickTime - _tStart > _phantomLife) then {" \n
"_callDispose = true;" \n
"};" \n
"" \n
"_rnd = floor random _phantomChance;" \n
"" \n
"_t = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "appear">*/
class appear
{
priority = 70.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_rnd > 6 && _rnd < 10 && _inHouse;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doAppear = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "door">*/
class door
{
priority = 60.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_rnd > 3.5 && _rnd < 6 && _inHouse;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doDoor = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "sound">*/
class sound
{
priority = 50.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_rnd > 1.5 && _rnd < 3.5 && _inHouse;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doSound = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "window">*/
class window
{
priority = 50.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_rnd > 10 && _rnd < 13.5 && _inHouse;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doWindow = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "bite">*/
class bite
{
priority = 40.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_rnd < 1.5 && _inHouse;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doBite = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "action">*/
class action
{
name = "action";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "complete">*/
class complete
{
priority = 100.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_actionDone && ((call compile _criteria) || (diag_tickTime > (_t + _sWait)));"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"" \n
"if (!isNil ""_criteriaMetAction"") then {" \n
"call _criteriaMetAction;" \n
"};" \n
"" \n
"" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "dispose">*/
class dispose
{
priority = 95.000000;
to="end";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doDispose;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "window">*/
class window
{
priority = 30.000000;
to="smash_window";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doWindow;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doWindow = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "door">*/
class door
{
priority = 30.000000;
to="phantom_door";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doDoor;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doDoor = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "bite">*/
class bite
{
priority = 20.000000;
to="do_bite";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doBite;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doBite = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "appear">*/
class appear
{
priority = 10.000000;
to="do_apparition";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doAppear;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doAppear = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "sound">*/
class sound
{
priority = 0.000000;
to="do_sound";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doSound;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doSound = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "reset_vars">*/
class reset_vars
{
name = "reset_vars";
init = /*%FSM<STATEINIT""">*/"//Default Vars" \n
"_actionDone = false;" \n
"_decisionMade = false;" \n
"_sWait = 0;" \n
"_doDispose = false;" \n
"_t = diag_tickTime;" \n
"" \n
"//Brain Vars" \n
"_criteria =""(false)"";" \n
"_criteriaMetAction = nil;" \n
"" \n
"" \n
"//phantom Vars" \n
"_dCond = false;" \n
"_rnd = random _phantomChance;" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="instinct";
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""">*/"""PHANTOM"" call EPOCH_unitSpawnDecrease;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "phantom_door">*/
class phantom_door
{
name = "phantom_door";
init = /*%FSM<STATEINIT""">*/" _obj = (getpos _plyr nearestObject ""House"");" \n
"_condIn = """";" \n
"if!(isNull _obj) then {" \n
" _house = typeof _obj;" \n
" _numDoors = getNumber (configfile >> ""CfgVehicles"" >> _house >> ""numberOfDoors""); " \n
" _doorRnd = (floor random _numDoors) + 1;" \n
"" \n
" if (_numDoors>0) then {" \n
"" \n
"_dCond = call compile getText(configFile >> ""CfgVehicles"" >> _house >> ""UserActions"" >> format[""OpenDoor_%1"",_doorRnd] >> ""Condition""); " \n
" _act = getText(configFile >> ""CfgVehicles"" >> _house >> ""UserActions"" >> format[""OpenDoor_%1"",_doorRnd] >> ""Statement""); " \n
"" \n
"if (!_dCond) then {" \n
"_dCond = call compile getText(configFile >> ""CfgVehicles"" >> _house >> ""UserActions"" >> format[""CloseDoor_%1"",_doorRnd] >> ""Condition""); " \n
" _act = getText(configFile >> ""CfgVehicles"" >> _house >> ""UserActions"" >> format[""CloseDoor_%1"",_doorRnd] >> ""Statement""); " \n
"};" \n
"" \n
"if (_dCond) then {" \n
" [_act,_obj] spawn {" \n
" this = _this select 1;" \n
" call compile (_this select 0);" \n
" };" \n
"};" \n
" " \n
" };" \n
" " \n
"" \n
"};" \n
"" \n
"_sWait = 1.5;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(false)"";" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "do_apparition">*/
class do_apparition
{
name = "do_apparition";
init = /*%FSM<STATEINIT""">*/"[]spawn {" \n
"_count = floor random 2;" \n
"" \n
"while{_count > -1}do{" \n
" _dir = getDir player;" \n
"_nukeHolderPos = [getposATL player, (random 4) max 0.5, _dir] call BIS_fnc_relPos;" \n
"_object = ""Logic"" createVehicleLocal _nukeHolderPos;" \n
"_source01 = ""#particlesource"" createVehicleLocal _nukeHolderPos;" \n
"_source01 setParticleCircle [2, [0.2, 0.2, 0.2]];" \n
"_source01 setParticleRandom [1, [0, 0, 0], [0.2, 0.2, 0.2], 0, 0.25, [1, 0, 1, 0.1], 0, 0.2];" \n
"_source01 setParticleParams [[""A3\data_f\ParticleEffects\Universal\Refract.p3d"", 1, 0, 1], """", ""Billboard"", 1, 1, [0, 0, 0], [1, 1, 1], 0, 0.05, 0.04, 0, [1.2, 2, 4], [[0.1, 0.1, 0.1, 1], [0.25, 0.25, 0.25, 0.5], [0.5, 0.5, 0.5, 0]], [0.08], 0, 0, """", """", _object];" \n
"_source01 setDropInterval 0.8;" \n
"uiSleep 2.8;" \n
"_count = _count - 1;" \n
"deleteVehicle _object;" \n
"deleteVehicle _source01;" \n
"};" \n
"" \n
"};" \n
"" \n
"_sWait = 1.5;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(false)"";" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "do_bite">*/
class do_bite
{
name = "do_bite";
init = /*%FSM<STATEINIT""">*/"_plyr call EPOCH_client_bitePlayer;" \n
"" \n
"" \n
"_sWait = 1.5;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(false)"";" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "do_sound">*/
class do_sound
{
name = "do_sound";
init = /*%FSM<STATEINIT""">*/"" \n
"_soundName = _soundNames select (floor random (count _soundNames));" \n
"" \n
"[_house,_soundName] spawn{" \n
"" \n
"_count = floor (random 7) max 3;" \n
"_dirTo = (random 360);" \n
"_sndLoc = ATLToASL ([player, 12, _dirTo] call BIS_fnc_relPos);" \n
" for ""_i"" from 1 to _count step 1 do{" \n
"_sound = format[""A3\Sounds_F\characters\footsteps\%2_%1.wss"", (floor random 7) + 1,_this select 1]; " \n
" playSound3D [_sound, player,false,_sndLoc,0.6,1,0]; " \n
"uiSleep 0.6;" \n
" };" \n
"};" \n
"" \n
"_sWait = 1.5;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(false)"";"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "smash_window">*/
class smash_window
{
name = "smash_window";
init = /*%FSM<STATEINIT""">*/" _obj = (getpos _plyr nearestObject ""House"");" \n
"_condIn = """";" \n
"if!(isNull _obj) then {" \n
" _house = typeof _obj;" \n
" _numWindows = getNumber (configfile >> ""CfgVehicles"" >> _house >> ""numberOfWindows""); " \n
" _windowRnd = (floor random _numWindows) + 1;" \n
"" \n
" if (_numWindows>0) then {" \n
" _glsHitPoint = format[""Glass_%1_hitpoint"",_windowRnd];" \n
" _obj setHitPointDamage [_glsHitPoint,1];" \n
"" \n
"" \n
" };" \n
" " \n
"" \n
"};" \n
"" \n
"_sWait = 1.5;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(false)"";" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="phantom";
finalStates[] =
{
"end"
};
};
/*%FSM</COMPILE>*/