|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OOAI
Method Summary | |
---|---|
int |
commandFinished(Unit unit,
int commandId,
int commandTopicId)
This AI event is sent when a unit finished processing a command. |
int |
enemyDamaged(Unit enemy,
Unit attacker,
float damage,
AIFloat3 dir,
WeaponDef weaponDef,
boolean paralyzer)
This AI event is sent when an enemy unit was damaged. |
int |
enemyDestroyed(Unit enemy,
Unit attacker)
This AI event is sent when an enemy unit was destroyed; see also the enemy-damaged event. |
int |
enemyEnterLOS(Unit enemy)
This AI event is sent when an enemy unit entered the LOS of this team. |
int |
enemyEnterRadar(Unit enemy)
This AI event is sent when an enemy unit entered the radar covered area of this team. |
int |
enemyLeaveLOS(Unit enemy)
This AI event is sent when an enemy unit left the LOS of this team. |
int |
enemyLeaveRadar(Unit enemy)
This AI event is sent when an enemy unit left the radar covered area of this team. |
int |
init(int teamId,
OOAICallback callback)
This AI event initializes a Skirmish AI instance. |
int |
load(String file)
Absolute file path, should be treated read-only |
int |
message(int player,
String message)
This AI event is a notification about a chat message sent by one of the participants of this game, which may be a player or an AI, including this AI. |
int |
playerCommand(List<Unit> units,
AICommand command,
int playerId)
see AISCommands.h S*Command structs |
int |
release(int reason)
This AI event tells a Skirmish AI instance, that it is no longer needed. |
int |
save(String file)
Absolute file path, writeable |
int |
seismicPing(AIFloat3 pos,
float strength)
This AI event is sent when a unit movement is detected by means of a seismic event. |
int |
unitCaptured(Unit unit,
int oldTeamId,
int newTeamId)
This AI event is sent when a unit changed from one team to an other through capturing. |
int |
unitCreated(Unit unit,
Unit builder)
This AI event is sent whenever a unit of this team is created, and contains the created unit. |
int |
unitDamaged(Unit unit,
Unit attacker,
float damage,
AIFloat3 dir,
WeaponDef weaponDef,
boolean paralyzer)
This AI event is sent when a unit was damaged. |
int |
unitDestroyed(Unit unit,
Unit attacker)
This AI event is sent when a unit was destroyed; see also the unit-damaged event. |
int |
unitFinished(Unit unit)
This AI event is sent whenever a unit is fully built, and contains the finnished unit. |
int |
unitGiven(Unit unit,
int oldTeamId,
int newTeamId)
This AI event is sent when a unit changed from one team to an other either because the old owner gave it to the new one, or because the new one took it from the old one; see the /take command. |
int |
unitIdle(Unit unit)
This AI event is sent when a unit finnished processing a command or just finished building, and it has currently no commands in it's queue. |
int |
unitMoveFailed(Unit unit)
This AI event is sent when a unit received a move command and is not able to fullfill it. |
int |
update(int frame)
This AI event is sent once per game frame, which is about 30 times per second by default. |
int |
weaponFired(Unit unit,
WeaponDef weaponDef)
This AI event is sent when a weapon is fired. |
Method Detail |
---|
int init(int teamId, OOAICallback callback)
int release(int reason)
int update(int frame)
int message(int player, String message)
int unitCreated(Unit unit, Unit builder)
int unitFinished(Unit unit)
int unitIdle(Unit unit)
int unitMoveFailed(Unit unit)
int unitDamaged(Unit unit, Unit attacker, float damage, AIFloat3 dir, WeaponDef weaponDef, boolean paralyzer)
int unitDestroyed(Unit unit, Unit attacker)
int unitGiven(Unit unit, int oldTeamId, int newTeamId)
int unitCaptured(Unit unit, int oldTeamId, int newTeamId)
int enemyEnterLOS(Unit enemy)
int enemyLeaveLOS(Unit enemy)
int enemyEnterRadar(Unit enemy)
int enemyLeaveRadar(Unit enemy)
int enemyDamaged(Unit enemy, Unit attacker, float damage, AIFloat3 dir, WeaponDef weaponDef, boolean paralyzer)
int enemyDestroyed(Unit enemy, Unit attacker)
int weaponFired(Unit unit, WeaponDef weaponDef)
int playerCommand(List<Unit> units, AICommand command, int playerId)
int commandFinished(Unit unit, int commandId, int commandTopicId)
commandId
- used on asynchronous commands only (is -1 for regular commands).
this allows the AI to identify a possible result event,
which would come with the same idcommandTopicId
- unique identifier of a command
(see COMMAND_* defines in AISCommands.h)callback.handleCommand(..., int commandId, ...)
int seismicPing(AIFloat3 pos, float strength)
int load(String file)
int save(String file)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |