Papyrus Log: Actor has no AI process

Post » Sun Mar 16, 2014 8:59 am

[03/15/2014 - 01:49:44PM] Error:  (FF000CF5): Actor has no AI process, cannot start combat.stack:	[ (FF000CF5)].blah.StartCombat() - "" Line ?	[ (FF000CF5)].blah.OnUpdate() - "script.psc" Line 66[03/15/2014 - 01:49:45PM] Error:  (FF000CF5): Actor has no AI process, cannot start combat.

Hi.

How can I fix this error? I have a custom summon with a script attached to it.

Scriptname npcsummonrandomstatscript extends Actorfloat randomfloat alphaActor Property npcref Autoevent oninit()        random = utility.RandomFloat(0.85, 1.15)        self.setscale(random)        self.SetActorValue("health", self.getbaseav("Health")*random)        self.SetActorValue("magicka", self.getbaseav("Magicka")*random)        self.SetActorValue("Stamina", self.getbaseav("Stamina")*random)        self.SetActorValue("OneHanded", self.getbaseav("OneHanded")*random)        self.SetActorValue("TwoHanded", self.getbaseav("TwoHanded")*random)        self.SetActorValue("LightArmor", self.getbaseav("LightArmor")*random)        self.SetActorValue("LightArmor", self.getbaseav("HeavyArmor")*random)        self.SetActorValue("LightArmor", self.getbaseav("Destruction")*random)        self.IgnoreFriendlyHits()        registerforsingleupdate(1)endeventevent onload()        random = utility.RandomFloat(0.85, 1.15)        self.setscale(random)        self.SetActorValue("health", self.getbaseav("Health")*random)        self.SetActorValue("magicka", self.getbaseav("Magicka")*random)        self.SetActorValue("Stamina", self.getbaseav("Stamina")*random)        self.SetActorValue("OneHanded", self.getbaseav("OneHanded")*random)        self.SetActorValue("TwoHanded", self.getbaseav("TwoHanded")*random)        self.SetActorValue("LightArmor", self.getbaseav("LightArmor")*random)        self.SetActorValue("LightArmor", self.getbaseav("HeavyArmor")*random)        self.SetActorValue("LightArmor", self.getbaseav("Destruction")*random)        self.IgnoreFriendlyHits()        registerforsingleupdate(1)endeventevent ondying(Actor akKiller);        alpha = 1.0;        while (alpha > 0);            self.SetAlpha(alpha);            utility.wait(0.05);            alpha = alpha - 0.1;        endWhile        unregisterforupdate();        self.disable();        self.delete()endeventevent ondeath(Actor akKiller)        unregisterforupdate()        self.delete()endeventevent onupdate()    if (self)        if getcombattarget() == game.getplayer() && npcref.getcombattarget() != game.getplayer()            stopcombat()            StopCombatAlarm()            startcombat(npcref.getcombattarget())        endif        if getcombattarget() != game.getplayer() && npcref.getcombattarget() == game.getplayer()            startcombat(npcref.getcombattarget())        endif        if isincombat() == 0 && npcref.isincombat()            startcombat(npcref.getcombattarget())        endif        if getcombattarget() == npcref            stopcombat()            StopCombatAlarm()        endif        if self.isdead() == 0 && self != none            registerforsingleupdate(1)        endif    else        unregisterforupdate()        return    endifendevent
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Sat Mar 15, 2014 7:59 pm

I don't see a StartCombat command in that script... so hard to know why you would get the error without the code ;)

User avatar
Paula Rose
 
Posts: 3305
Joined: Fri Feb 16, 2007 8:12 am

Post » Sun Mar 16, 2014 1:20 am

I thought it would be something simple so I snipped the stuff out. :)

I edited the post now.

User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Sat Mar 15, 2014 7:37 pm

Hmm, that's a weird one. I thought maybe if you were calling StartCombat in the OnInit event it might be too soon, and the actor might not be "ready" to be manipulated yet. But seeing as you have a 1 second pause before the Update block where you call StartCombat(), that seems unlikely to be the problem. In any case, you could try adding a pause to check for the actor's AI to be enabled - something like:

event onupdate()    while (!self.IsAIEnabled)        utility.wait(0.5)  ;wait for AI to be enabled, hopefully    endWhile    debug.notification("AI is enabled, starting combat decisions...")    ;...

If you don't see the notification pop up, there's probably a bigger problem. Maybe someone else has another suggestion too :)

User avatar
GPMG
 
Posts: 3507
Joined: Sat Sep 15, 2007 10:55 am

Post » Sat Mar 15, 2014 5:57 pm

The ref has a [D] at the end. So it is marked for deletion. Because of the running onupdate block it can't be deleted.

Apparently a summoned creature neither dies nor is disabled nor is the Ai disabled. This is really weird as towHarvest can fetch firesalt from summoned vanilla creatures.

I added a getdistance > 4096 to the script with a unregister and kill and no longer did the onupdate run. Is there a better solution to check whether a summoned creature is gone or not?

User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am


Return to V - Skyrim