|
Description
|
Peusedo Code |
|
Create the world database. Create the DTED matrix
|
cPlatoon * plt; cAgent * agent; cGoalPoint * point; cGoalItem * item
world->Initialize();
world->Create_World(...);
world->Create_DTED(...); |
|
Add a group and two agents to the environment
|
plt = world->Add_Group( GroupRed );
agent = plt->Add_Agent(...);
agent = plt->Add_Agent(...); |
|
Set group position and formation of the agents
|
plt->SetGroupPosition( 9163.0, 10259.0 );
plt->Set_Agents_Group_Formation(8,true);
|
|
Get the starting control point. Add a goal item for the point. Move fast to the next point
|
point = plt->plt_goals->GetObjectFromIndex(0);
point->movingstate = MovingFast; |
|
Goal item
1.1
|
Item=point->Add_GoalItem(giWaitUntilReceiveKeyword);
item->data.ReceiveFromID = 1;
item->SetKeyword("First Step Go..."); |
|
Add a control point
|
point = plt->Add_Plt_GoalPoint( gpPassThrough, 9345.0, 9742.0 );
point = plt->Add_Plt_GoalPoint( gpTactical , 9220.0, 9595.0 ); |
|
Add a tactical control point. Wait until the group 2 leaves from point 3
|
point = plt->Add_Plt_GoalPoint( gpTactical , 8945.0, 9270.0 ); |
|
Goal item
3.1
|
item= point ->Add_GoalItem(giWaitUntilContinueMission);
item->data.ReceiveFromID = 2;
item->data.GoalPointID = 3; |
|
Add another tactical control point. Wait until group 1 arrives at point 5. When ready to continue, send a keyword to group 1. Wait for a response from group 1 to leave the point. Move slow to the next point
|
point = plt->Add_Plt_GoalPoint( gpTactical , 8945.0, 9270.0 );
point ->movingstate = MovingSlow; |
|
Goal item
4.1
|
item = point ->Add_GoalItem(giWaitUntilArrival);
item->data.ReceiveFromID = 1;
item->data.GoalPointID = 5; |
|
Goal item
4.2
|
item = point ->Add_GoalItem(giReadyToContinueDo);
item->data.doAction = doSendKeyword;
item->data.SendToID = 1;
item->SetKeyword("Group 3 Ready"); |
|
Goal item
4.3
|
item = point ->Add_GoalItem(giWaitUntilResponseKeyword);
item->data.ReceiveFromID = 1;
item->SetKeyword("Mission Start"); |
|
Add the target point. Put a bomb to the point and move fast after leaving. While leaving the point send the keyword mission completed
|
point = plt->Add_Plt_GoalPoint( gpTarget , 8935.0, 9130.0 );
point ->movingstate = MovingFast; |
|
Goal item
5.1
|
item = point ->Add_GoalItem(giArrivalDo);
item->data.doAction = doPutBomb; |
|
Goal item
5.2
|
item = point ->Add_GoalItem(giContinueMissionDo);
item->data.doAction = doSendKeyword;
item->data.SendToID = -1;
item->SetKeyword("Mission Complete"); |
|
Add another control point
|
point = plt->Add_Plt_GoalPoint( gpPassThrough, 9212.0, 9124.0 ); |
|
Home point
|
point = plt->Add_Plt_GoalPoint( gpHome , 9683.0, 8400.0 ); |