Need to make target go to sleep during a fight

Post » Fri Aug 30, 2013 1:45 pm

Yet another thing that seemed straightforward and has turned out to be anything but...

I've got a boss fight that I'm putting together that involves having the boss, an improbably large chaurus, go into the curled-up sleeping animation during the fight and stay there a while. I've got a CreatureAlcoveMarkerBG set up in the room, and the boss is linked to it. Navmesh is working fine, and if I assign the boss a Sleep package, it will be curled up on the marker when I enter the room.

The problem is getting it to go back to the marker and sleep during the fight. At a certain point in the fight, I set its aggression to zero and use StopCombat to break it out of the fight with the player. I then (via a condition) give it a package that makes it ignore combat, run to the linked reference with Flee, then Sleep on its linked reference.

The problem is, it runs to the marker just fine but just stands there, doing nothing. I've tried replacing Flee with Travel, I've tried replacing Sleep with Activate, Sit, and UseIdleMarker. I even tried defining a custom Idle Marker (which I had to use TES5Edit for, because CK doesn't let you assign most non-Character Idles to a marker, despite there being many such markers in vanilla), and that didn't work either. Basically the only time I can ever get it to sleep on the marker is by making it do so before the fight starts. Once it's off the marker, it never sleeps again.

The only way I can get it to curl up is to send it the idleLeanEnterInstant animation event, then freeze it with EnableAI(0) after .7 seconds. Obviously this isn't a real solution.

Can anyone throw me a clue here? I'm at a loss and if I can't make this work, I'm going to have to rework the whole fight.

User avatar
Celestine Stardust
 
Posts: 3390
Joined: Fri Dec 01, 2006 11:22 pm

Return to V - Skyrim