Statue Animation Doesn't Resume After Being Released

Post » Wed Nov 11, 2009 2:28 am

Alright, I've got a script that more-or-less functions. It is meant to turn the creature it is attached to into a statue, no movement, no interaction, and has the effectStone shader applied. It then reanimates the creature when activated. This all works. But the "statue" still plays the idle animation even when frozen. The only way I've found to eliminate the look of breathing is to use SkipAnim. However, once SkipAnim is run I can't get animations to play normally, at all really. I've tried PlayGroup and LoopGroup, as the documentation says those will undo SkipAnim. But I'm not having any luck. My script is below, any help or insights on this would be awesome!

short doOnceshort isAliveref statueCreaturebegin OnActivate		if isAlive == 1			set isAlive to 0			set doOnce to 0		else			set isAlive to 1			set doOnce to 0		endifendbegin gamemode	if isAlive == 1		if doOnce == 0			set statueCreature to MyScampCreature			statueCreature.setalert 0			statueCreature.setunconscious 0			statueCreature.setghost 0			statueCreature.setav speed 10			statueCreature.pms effectReanimate 1			statueCreature.PlayGroup Forward 1			statueCreature.StartCombat Player			set doOnce to 1		endif	else		if doOnce == 0			set statueCreature to MyScampCreature			statueCreature.setalert 1			statueCreature.pickidle			statueCreature.setunconscious 1			statueCreature.setghost 1			statueCreature.setav speed 0			statueCreature.pms effectStone			statueCreature.SkipAnim			set doOnce to 1		endif	endif	end

User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Wed Nov 11, 2009 9:06 am

You should use the "setrestrained 1" along with "setghost 1".

-The "setrestrained 1" suspends motion, but leaves the AI intact and running. The statue will be allert, aware and ready for combat at all times, only that it will be immobile.
-"Setghost 1" means that the creature will not take any damage (from weapons or spells) and will not engage in combat.




My guess is that all you have to do in order to bring the statue to life when activated is to use the "setrestrained 0" and "setghost 0" commands (and omit the skipanim from the script) and the creature will reanimate and attack the player immediately.


Hope that helps.
Cheers!
User avatar
Emma Parkinson
 
Posts: 3401
Joined: Wed Jul 26, 2006 5:53 pm

Post » Wed Nov 11, 2009 8:39 am

You should use the "setrestrained 1" along with "setghost 1".

-The "setrestrained 1" suspends motion, but leaves the AI intact and running. The statue will be allert, aware and ready for combat at all times, only that it will be immobile.
-"Setghost 1" means that the creature will not take any damage (from weapons or spells) and will not engage in combat.

My guess is that all you have to do in order to bring the statue to life when activated is to use the "setrestrained 0" and "setghost 0" commands (and omit the skipanim from the script) and the creature will reanimate and attack the player immediately.


I tried adding SetRestrained to the script. And, I removed SkipAnim. The creatures toggle between life and stone just fine, but they play the idle animations no matter what state they are in. Which they do whether SetRestrained is there or not.

Could this be because the things running the script are creatures instead of NPCs? Can creatures not be fully frozen and revived? Maybe it's the order that I'm running the commands? I may try it on an NPC later and see if it works there.
User avatar
lolly13
 
Posts: 3349
Joined: Tue Jul 25, 2006 11:36 am

Post » Wed Nov 11, 2009 1:07 pm

Found the solution. The thing you need is the script of the Ayleid Guardians from the Theieves Guild last quest, The Ultimate Heist. They are ment to be stone statues that come to life and attack the player if he comes too close, but basically they are enlarged Altmers with a stone shader. You can find them in the CS in Actors>NPC>High Elf>Male>Ayleid Guardian.

Here is the script:



ScriptName ElvenStatueScript

Short NewAmbush
Short SetIdle

begin OnLoad
equipitem TG11ElvenLongsword
setalert 1
setghost 1
pickidle
setunconscious 1
setdestroyed 1 ; so you can't activate
pms effectTG11stone
end

Begin OnDeath
setdestroyed 1
End

Begin GameMode
If GetStage TG11Heist >=73 && NewAmbush == 0
If GetDistance Player <= 1600
Set NewAmbush to 1
TG11Statue01.SetGhost 0
TG11Statue01.SetUnconscious 0
TG11Statue01.SetDestroyed 0
TG11Statue02.SetGhost 0
TG11Statue02.SetUnconscious 0
TG11Statue02.SetDestroyed 0
Set SetIdle to 0
ElseIf SetIdle == 0
PickIdle
Set SetIdle to 1
EndIf
EndIf
End



Also, I think the way to get rid of skipanim is to use the command "set skipanim to 0". I don't know if it actually exists, but it is similar to the "Set SetIdle to 0". Worth a try.

I await the results. Hope everything comes out fine!
Cheers!
User avatar
Iain Lamb
 
Posts: 3453
Joined: Sat May 19, 2007 4:47 am

Post » Wed Nov 11, 2009 9:28 am

Another solution might be to edit a stationary pose animation in blender and nikskope, make it a specialidle and force it on the creature. Then script it to leave the animation and adopt combat as soon as the "statue" is activated (eliminate "setdestroyed") or is being approached by the player.

However, I'm working on this stationary animation stuff myself and still haven't fully figured it out.

So your best bet is to look at the ayleid guardian script and use bits of it for your scamp statue.

All the best!
User avatar
sara OMAR
 
Posts: 3451
Joined: Wed Jul 05, 2006 11:18 pm


Return to IV - Oblivion