PLUGIN ... Random AI Aggression?
Posted: Thu Jan 27, 2011 5:08 pm
Pip,
I'm experimenting again, but with the StartTurnPost ....
In theory, your VP PLUGIN uses the StartTurn to issue the aggression (34) when a hostile VP is taken ... right?
So, I'm trying to see if randomizing the aggression in StartTurnPost (afterwards) would work ... Hard to tell
The code below assumes I have only TEAM #1 change aggression ... 33% chance it won't change from 34.
Am I on the right track?
I'm experimenting again, but with the StartTurnPost ....
In theory, your VP PLUGIN uses the StartTurn to issue the aggression (34) when a hostile VP is taken ... right?
So, I'm trying to see if randomizing the aggression in StartTurnPost (afterwards) would work ... Hard to tell
The code below assumes I have only TEAM #1 change aggression ... 33% chance it won't change from 34.
Code: Select all
FUNCTION StartTurnPost(side)
{
int i ;
// alternate AI Team Aggression ... does it work?
if(side == 1)
{
i = Rand(1,3) ;
if ( i == 1 )
{
SetTeamAggression(1, 1, 64) ;
}
if ( i == 2 )
{
SetTeamAggression(1, 1, 0) ;
}
}
}