Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*%FSM<COMPILE "F:\FSM Editor Personal Edition\scriptedFSM.cfg, tut">*/
- /*%FSM<HEAD>*/
- /*
- item0[] = {"init",0,250,-48.772354,-125.615723,41.227634,-75.615761,0.000000,"init"};
- item1[] = {"delay",4,218,13.300671,85.187050,103.300690,135.187073,0.000000,"delay"};
- item2[] = {"end",1,250,263.887787,-120.017616,353.887787,-70.017586,0.000000,"end"};
- item3[] = {"Connecting",2,250,-47.202316,17.096188,42.797699,67.096191,0.000000,"Connecting"};
- item4[] = {"client",4,218,-47.372559,-61.222324,42.627441,-11.222324,0.000000,"client"};
- item5[] = {"delay",4,218,-98.342255,81.716270,-8.342241,131.716309,0.000000,"delay"};
- item6[] = {"attempts",2,250,-54.314095,168.426575,35.685921,218.426575,0.000000,"attempts"};
- item7[] = {"connected",4,218,-52.578724,231.478821,37.421276,281.478821,0.000000,"connected"};
- item8[] = {"",7,210,304.839844,254.332092,312.839844,262.332062,0.000000,""};
- item9[] = {"server",4,218,90.366852,-124.104118,180.366837,-74.104111,0.000000,"server"};
- item10[] = {"server_end",1,250,90.006142,-226.366333,180.006195,-176.366348,0.000000,"server end"};
- item11[] = {"too_many_attempt",4,218,125.017967,112.780563,215.017990,162.780563,0.000000,"too many" \n "attempts"};
- item12[] = {"",7,210,167.497955,2.328092,175.497925,10.328063,0.000000,""};
- link0[] = {0,4};
- link1[] = {0,9};
- link2[] = {1,3};
- link3[] = {3,5};
- link4[] = {4,3};
- link5[] = {5,6};
- link6[] = {6,1};
- link7[] = {6,7};
- link8[] = {6,11};
- link9[] = {7,8};
- link10[] = {8,2};
- link11[] = {9,10};
- link12[] = {11,12};
- link13[] = {12,2};
- globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-178.642654,477.938232,529.421509,-330.925720,957,1254,1};
- window[] = {0,-1,-1,-1,-1,1123,597,2517,94,1,975};
- *//*%FSM</HEAD>*/
- class FSM
- {
- fsmName = "tut";
- class States
- {
- /*%FSM<STATE "init">*/
- class init
- {
- name = "init";
- init = /*%FSM<STATEINIT""">*/"allowConnection = false;" \n
- "_attempts = 0;" \n
- ""/*%FSM</STATEINIT""">*/;
- precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
- class Links
- {
- /*%FSM<LINK "server">*/
- class server
- {
- priority = 0.000000;
- to="server_end";
- precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
- condition=/*%FSM<CONDITION""">*/"isDedicated"/*%FSM</CONDITION""">*/;
- action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
- };
- /*%FSM</LINK>*/
- /*%FSM<LINK "client">*/
- class client
- {
- priority = 0.000000;
- to="Connecting";
- precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
- condition=/*%FSM<CONDITION""">*/"!isDedicated"/*%FSM</CONDITION""">*/;
- action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
- };
- /*%FSM</LINK>*/
- };
- };
- /*%FSM</STATE>*/
- /*%FSM<STATE "end">*/
- class end
- {
- name = "end";
- init = /*%FSM<STATEINIT""">*/"systemchat format [""Time passed since start = %1, it took %2 attempts"",(diag_tickTime - _totalTime),_attempts];"/*%FSM</STATEINIT""">*/;
- precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
- class Links
- {
- };
- };
- /*%FSM</STATE>*/
- /*%FSM<STATE "Connecting">*/
- class Connecting
- {
- name = "Connecting";
- init = /*%FSM<STATEINIT""">*/"systemChat ""Connecting to a server"";" \n
- "_initTime = diag_tickTime;"/*%FSM</STATEINIT""">*/;
- precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
- class Links
- {
- /*%FSM<LINK "delay">*/
- class delay
- {
- priority = 0.000000;
- to="attempts";
- precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
- condition=/*%FSM<CONDITION""">*/"(diag_tickTime -_initTime) > 3"/*%FSM</CONDITION""">*/;
- action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
- };
- /*%FSM</LINK>*/
- };
- };
- /*%FSM</STATE>*/
- /*%FSM<STATE "attempts">*/
- class attempts
- {
- name = "attempts";
- init = /*%FSM<STATEINIT""">*/"_attempts = _attempts + 1;" \n
- "_totalTime = diag_tickTime + _this;" \n
- "_initTime = diag_tickTime;"/*%FSM</STATEINIT""">*/;
- precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
- class Links
- {
- /*%FSM<LINK "connected">*/
- class connected
- {
- priority = 0.000000;
- to="end";
- precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
- condition=/*%FSM<CONDITION""">*/"allowConnection"/*%FSM</CONDITION""">*/;
- action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
- };
- /*%FSM</LINK>*/
- /*%FSM<LINK "too_many_attempt">*/
- class too_many_attempt
- {
- priority = 0.000000;
- to="end";
- precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
- condition=/*%FSM<CONDITION""">*/"_attempts > 5"/*%FSM</CONDITION""">*/;
- action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
- };
- /*%FSM</LINK>*/
- /*%FSM<LINK "delay">*/
- class delay
- {
- priority = 0.000000;
- to="Connecting";
- precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
- condition=/*%FSM<CONDITION""">*/"(diag_tickTime -_initTime) > 3"/*%FSM</CONDITION""">*/;
- action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
- };
- /*%FSM</LINK>*/
- };
- };
- /*%FSM</STATE>*/
- /*%FSM<STATE "server_end">*/
- class server_end
- {
- name = "server_end";
- init = /*%FSM<STATEINIT""">*/"diag_log ""i was a server yay"""/*%FSM</STATEINIT""">*/;
- precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
- class Links
- {
- };
- };
- /*%FSM</STATE>*/
- };
- initState="init";
- finalStates[] =
- {
- "end",
- "server_end",
- };
- };
- /*%FSM</COMPILE>*/
Advertisement
Add Comment
Please, Sign In to add comment