Does playidle work?

Post » Sat Feb 19, 2011 9:38 am

I'm getting a strange error message when trying to compile a script that has the player performing an idle animation using the playidle function.

My line of code is simply
if ( doonce == 0 )
player.playidle EscortWaitingWave 1
set doonce to 1
endif


When I go to compile, I get this error
Invalid inventory object "EscortWaitingWave" for parameter idle form.

I used the EscortWaitingWave animation because it's a default one at the very top of the tree and I figured would not interfere with anything. And what's this about an "invalid inventory object?" Any ideas what I'm doing wrong here?
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm

Post » Sat Feb 19, 2011 6:14 am

From looking at another forum, I found that this code will compile:

scn scriptref animshort dooncebegin gamemodeIf doonce == 0	set anim to escortwaitingwave	player.playidle anim 1	set doonce to 1endifend


For some reason it wants you to use a variable which you set to the animation reference. Ive not playtested this but give it a go, if it compiles in the editor itll probably work.
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am

Post » Sat Feb 19, 2011 1:07 am

I have been using this (similar I mean) in my new mod and it works well!
From my limited use; I think even if the idle conditions would normally prevent it still works!

Remember that playing an animations this way does not mean it will "do" stuff like hit actors or block attacks.
But animations just for visual effect works great.

From looking at another forum, I found that this code will compile:

scn scriptref animshort dooncebegin gamemodeIf doonce == 0	set anim to escortwaitingwave	player.playidle anim 1	set doonce to 1endifend


For some reason it wants you to use a variable which you set to the animation reference. Ive not playtested this but give it a go, if it compiles in the editor itll probably work.

User avatar
Antony Holdsworth
 
Posts: 3387
Joined: Tue May 29, 2007 4:50 am

Post » Sat Feb 19, 2011 8:20 am

Thank you that did the trick.

One thing I've noticed about animations, however (maybe someone can enlighten me on this):

I wanted to use a combat animation as an idle. So I simply copied and pasted the combat kf file into the idle folder and made a new entry for it in the CS. Problem is, with any combat animation I use, as soon as it hits the last frame, the game crashes. Is there something different in combat kf files that causes this when they're used as idle ones?
User avatar
Rowena
 
Posts: 3471
Joined: Sun Nov 05, 2006 11:40 am


Return to IV - Oblivion