Crashes with "PlayIdle" and "PickIdle"

Post » Wed Jul 08, 2015 10:04 pm

I am having frequent crashes when trying to force idle animations through scripts. Either way -- PlayIdle or PickIdle -- causes very, very frequent crashes. Something is either wrong with the functions themselves (less likely), or there is something with my scripts. The animations I'm using are almost all straight out of the vanilla BSA's and renamed. So I highly doubt the animations are at fault. Most of the time when I force an idle animation the game crashes right when the script calls the function. But also pretty frequently it will crash towards the end of the animation loop. I've done some troubleshooting; I've removed the function that forces the idle and there are no crashes. I've commented out just the "PlayIdle" (my prefered function over "PickIdle") line that forces the offending animation and there are no crashes. So, it is something with the function.

For all idle animations I'm using, I've set strict conditions: created a faction with different stages and set the each idle to a different stage. That was just to prevent NPC's from randomly playing the idle with "PickIdle". I prefer to use "PlayIdle". Here is the script that forces the animation:

Begin Function { rTarget }	If rTarget.IsActor == 0		Return	Endif	If rTarget.GetDead == 1		Return	Endif	let rtest := MalonnRegStagger	Let fHeading := rTarget.GetHeadingAngle Player	Let fZAngle := ( rTarget.GetAngle Z + fHeading )	If fHeading <= -140 || fHeading >= 140		Let aaMalonnPushQuest.sStaggerVar := 0		Let fReTimer := 0		rTarget.PushActorAway rTarget -1		If ( rTarget.GetDetectionLevel Player <= 1 && aaMalonnPushQuest.sSneakBashVar == 1 )			Let aaMalonnPushQuest.sSneakBashVar := 0			If rTarget.GetActorValueC 10 >= 0				rTarget.ModAVMod Fatigue "Script" -10000			Endif		Endif	Else		rTarget.SetAngle Z, fZAngle		If aaMalonnPushQuest.fPowerTimer >= 1.5			rTarget.SetFactionRank MalonnAnimFaction, 1			rTarget.PickIdle			Let aaMalonnPushQuest.fPowerTimer := 0			rTarget.SetFactionRank MalonnAnimFaction, -1		Else			rTarget.SetFactionRank MalonnAnimFaction, 0			rTarget.PlayIdle rtest 1			rTarget.SetFactionRank MalonnAnimFaction, -1		Endif		Let aaMalonnPushQuest.sStaggerVar := 0		Let sTracker += 1		rTarget.ModDisposition Player -10		If rTarget.IsGuard == 1			Player.ModCrimeGold 1000		Endif	Endif	If sTracker == 2 && sSpeakCtrl == 0		Let sSpeakCtrl := 1		SayTo Player, AssaultNoCrime, 0	Elseif sTracker >= 3		If ( rTarget.IsAnimGroupPlaying Stagger == 1 || rTarget.IsIdlePlaying == 1 )			Return		Else			Let sTracker := 0			rTarget.StartCombat Player		Endif	Endif	End

I have also isolated that script down to (basically) just the the PlayIdle call, like so:

begin _function {rtest}	rtest.SetFactionRank MalonnAnimFaction, 0	let aaMalonnPushQuest.sStaggerVar := 0	rtest.playidle MalonnRegStagger 1	rtest.SetFactionRank MalonnAnimFaction, -1end

Does anyone have any idea or experience with idle animations? Maybe there is something you have learned that prevents CTD's. Mods likle UVIII use tons of idles without comnstant crashes, so there is something that can be done.

User avatar
Czar Kahchi
 
Posts: 3306
Joined: Mon Jul 30, 2007 11:56 am

Post » Wed Jul 08, 2015 7:09 pm

Don't know about the crashes, but judging from the script, you want to play stagger animation? Have you considered PlayGroup command?

Completely unrelated, but what is "sTracker" variable in the first script supposed to do?

User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am


Return to IV - Oblivion