Jump to content
  • 0

AI Activated before round start


y2alex

Question

3 answers to this question

Recommended Posts

  • 0

That happens when there is no limitation to the activation of AI. Good AI activation methods will make sure that roundstate=2 before allowing it to activate. Roundstate is the state of your round. When it's equal to 0, it's in the pre-intro, 1 is the intro, 2 is the fight after it's started, and 3 is the end of the round.

So assuming that an AI Activation method looks something like this in 1.0:

; Turn on the AI when ailevel>=0 (AI is active) and the fight as started (past intro)
[State , AI Activation]
type = VarSet
trigger1 = ailevel && roundstate=2
var(59) = 1

; Turn off the AI if ailevel=0 (Player has control) or the fight hasn't started yet
[State , AI Deactivation]
type = VarSet
trigger1 = !ailevel || roundstate!=2
var(59) = 0

That's for your reference. I'd not blindly copy and paste that, but the idea is you use roundstate=2 to limit the activation until after the round actually starts.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...