Just to have a base to mess about with I'm porting tiny bits of Kaik :)
What I'm trying to do now is this:
Code: Select all
boolean haveClearShot = true;
TraceRayAICommand traceRayAICommand = new TraceRayAICommand(commander.getPos(), new AIFloat3(targetDir),maxRange,commander.getUnitId(),-1,0);
cb.getEngine().handleCommand(AICommandWrapper.COMMAND_TO_ID_ENGINE,
-1, traceRayAICommand);
if (traceRayAICommand.hitUID != -1) {
haveClearShot =Unit.getInstance(cb,traceRayAICommand.hitUID).getAllyTeam() !=
cb.getGame().getMyAllyTeam();
}
What would the correct way be to achieve this ? :)
Or is it necessary to extend JavaOOAI first to support this ? :)
Cheers!