Page 1 of 1
CheckAILevel = 0
Posted: Mon Mar 10, 2008 3:02 am
by lodilefty
I want to write events that will occur only for a human player.
Will CheckAILevel = 0 limit the event to human only?
The script report for this seems to imply 'minimum AI of 0', rather than 'only 0'
Posted: Mon Mar 10, 2008 8:47 am
by PhilThib
I am not sure this will work...for what I understood, that would work for both the Human and AI players, starting with the lowest AI level (i.e. 0)...

Posted: Mon Mar 10, 2008 9:19 am
by dooya
PhilThib wrote:I am not sure this will work...for what I understood, that would work for both the Human and AI players, starting with the lowest AI level (i.e. 0)...
If this logic applies, one could check for
CheckAILevel = <maximumAIlevel>+1 to limit the event to humans?
Posted: Mon Mar 10, 2008 9:59 am
by Primasprit
lodilefty wrote:I want to write events that will occur only for a human player.
Will CheckAILevel = 0 limit the event to human only?
The script report for this seems to imply 'minimum AI of 0', rather than 'only 0'
CheckAILevel = 0 tests if the AI level is equal or bigger than the given number. So the events would work for both, human and AI.
You can however write an event which test for AI level > 0 and deactivates the events for the AI (
ChgEvtOccurs)
Cheers
Norbert
Posted: Tue Oct 20, 2009 7:51 pm
by bigus
Bump
This post applies to CheckAILevel and CheckISPlayer
Here was my situation.
I wanted the AI to only pick from certain draft and financial options. This was call for volunteers only etc. I wanted the human player to have full control.
I tried CheckIsPlayer [;NOT] thinking the "NOT" would make the AI true and in turn run the event.
For the life of me I could not get this "NOT" to reverse from false to true.
Then I tried CheckAILevel 1. It worked like a charm. In fact I can set the AI events to run at certain AI levels now.
To sum this up,
If you want the event to run by testing if the side is AI then use....
CheckAILevel (column C) and 1 (in column D)
Note: do not use < or> in column D. Just use 1,2,3 or 4 (1 being easy mode or Higher and 2 being normal level or higher etc)
If you want the event to run by testing if the side is Human then use....
CheckISPlayer(column C) and Null (in column D)
This sets the event to run for a human player by setting CheckISPlayer to true.
Hope this helps someone