AI ... editing question/help.
Posted: Tue Oct 25, 2011 6:02 pm
Pip,
Can you split off the function that calls the AI_UNIT(me) ???
What I'd like to do is have the AI go through all it's units once (with a lower "gAttempt" value), and then go through all the units again (or several times). Currrently, the AI only considers each unit once, then moves along. I want the AI to move the units "peicemeal" to better choreograph it's teams.
I looked at your current flow with these three functions ;
I was thinking about this kind of flow ...
1st Move
AI_Rebuild
AI_Team
AI_Unit
2nd Move
AI_Rebuild
AI_Team
AI_Unit
When you get a chance ... Would there be a better approach to this?
Thanks,
Rob
Can you split off the function that calls the AI_UNIT(me) ???
What I'd like to do is have the AI go through all it's units once (with a lower "gAttempt" value), and then go through all the units again (or several times). Currrently, the AI only considers each unit once, then moves along. I want the AI to move the units "peicemeal" to better choreograph it's teams.
I looked at your current flow with these three functions ;
Code: Select all
//**************************************************************************
// REQUIRED FUNCTION: Called before anything else to rebuild any global AI data
//**************************************************************************
FUNCTION AI_REBUILD(side)
//**************************************************************************
// REQUIRED FUNCTION : this is called for each team after the AI Rebuild is called each Ai turn
//**************************************************************************
FUNCTION AI_TEAM(side, team)
//**************************************************************************
// REQUIRED FUNCTION : This is called by the AI until it returns -1
//**************************************************************************
FUNCTION AI_UNIT(me)
1st Move
2nd Move
When you get a chance ... Would there be a better approach to this?
Thanks,
Rob