ET:goal airstrike
From Omni-bot Wiki
| ET Script Goals | Goal Airstrike |
This goal provides functionality for Fieldops bots to throw an airstrike from a waypoint. It relies on a populated table of waypoint names for the bots team. It requires some script and waypoint configuration.
Setup
After selecting and naming waypoints for use with the goal, the teams AS table needs to be populated for the bots to use them. The tables must be in the Map table of the mapscript.gm:
global Map =
{
//tables to hold current AS goals
AxisASTable = {},
AlliesASTable = {},
//optional priorities for the airstrike goals. default is 0.95
AxisASPriority = 0.6,
AlliesASPriority = 0.6,
}
In this case, the tables have been initialized but are empty. The tables can be populated in triggers to ensure that they are active at the correct time:
global Map =
{
//tables to hold current AS goals
AxisASTable = {},
AlliesASTable = {},
sometrigger = function( trigger )
{
//activate some airstrike waypoints for the axis team
Map.AxisASTable = { "as_waypoint1", "as_waypoint2", },
}
anothertrigger = function( trigger )
{
//deactivate some airstrike waypoints for the axis team
Map.AxisASTable = {},
}
};
In cases where you may want different airstrike goals for different phases, it may be a good idea to set up a few tables to be copied to the main AS table(s):
global Map =
{
//tables to hold current AS goals
AxisASTable = {},
AlliesASTable = {},
//different airstrike tables to be copied
axis_aswall = { "as_waypoint1", "as_waypoint2", },
axis_asgate = { "as_waypoint3", "as_waypoint4", },
sometrigger = function( trigger )
{
//activate the wall airstrike waypoints for the axis team
Map.AxisASTable = Map.axis_aswall;
}
walltrigger = function( trigger )
{
//activate the gate airstrike waypoints for the axis team
Map.AxisASTable = Map.axis_asgate;
}
anothertrigger = function( trigger )
{
//deactivate some airstrike waypoints for the axis team
Map.AxisASTable = {},
}
};