//**************************************************************************************** // // FIGHTER: PATROL AND CALL IN REINFORCEMENTS // MISSION: Mc2_16 // Second Group Reinforcement (East Path) // Units: 2 AttackStateHandle) then if ((numFunctionalWeapons > 0) and (curTarget == 0)) then coreAttack(pilotEventParams[0], TACORDER_PARAM_PURSUE); setState(AttackStateHandle); endif; endif; endcase; case PILOT_EVENT_ATTACK_ORDER: curTarget = getTarget(-1); if (curStateHandle <> AttackStateHandle) then if ((numFunctionalWeapons > 0) and (curTarget == 0))then coreAttack(pilotEventParams[0], TACORDER_PARAM_PURSUE); setState(AttackStateHandle); endif; endif; endcase; case PILOT_EVENT_FIRED_WEAPON: endcase; endswitch; endif; endwhile; return(0); endfunction; //---------------------------------------------------------------------------------------- state noWeapons; code setDebugString(-1, 3, " NO WEAPONS "); if (objectClass(-1) == 2) then coreEject; else corePower(false); endif; endstate; //---------------------------------------------------------------------------------------- state Base1Escort; code update; setDebugString(-1, 3, " Base1Escort "); corePatrol(patrolState1, patrolPath1, AttackStateHandle); trans Base1Patrol; resetOrders(1); endstate; //---------------------------------------------------------------------------------------- state Base1Patrol; code update; setDebugString(-1, 3, " BasePatrol "); corePatrol(patrolState2, patrolPath2, AttackStateHandle); resetOrders(1); endstate; //---------------------------------------------------------------------------------------- state attack; var integer tacticState; code update; setDebugString(-1, 3, " ATTACK "); AttackMusicTrigger2 = TRUE; // coreAttackTactic(0, TACORDER_PARAM_NONE, TACTIC_JOUST, tacticState); coreAttack(0, TACORDER_PARAM_PURSUE); resetOrders(1); transBack; endstate; //---------------------------------------------------------------------------------------- state start; code setDebugString(-1, 3, " WAIT "); update; endstate; //---------------------------------------------------------------------------------------- endfsm.