Jump to content

PlayIdle error Invalid inventory object


DarkSpyda04

Recommended Posts

SOLVED

 

I keep getting this blasted error "Invalid inventory object 'AnimationIdle' for parameter Idle form. Compiled script not saved!" and all I'm trying to do is get an idle animation to play on trigger. Here's the code:

 

SCN zAnimScript

 

short doonce

 

Begin OnActivate

 

if (doonce == 0)

NPCTestREF.PlayIdle EscortWaitingWave 1

Set doonce to 1

endif

 

End

 

Also, is there any way to copy/paste code because it's getting annoying typing it up from scratch.

Edited by DarkSpyda04
Link to comment
Share on other sites

Try loading the anim ref in a variable. like this:

 

SCN zAnimScript

 

short doonce

ref MyIdleRef

 

Begin OnActivate

 

if (doonce == 0)

Let MyIdleRef := EscortWaitingWave

NPCTestREF.PlayIdle MyIdleRef 1

Set doonce to 1

endif

 

End

 

It will compile, and I suppose it will work in game.

If it works, the error you are getting is a compiler bug and should be reported to the OBSE team in the official Beth Forum.

The WIKI also should mention it.

I can do either for you. Just let me know if you want me to do it.

 

You can copy-paste to/from any text editor. You can also comment the line causing the error so the compiler saves the script.

Link to comment
Share on other sites

Alright it works. I tried it out with both do once, setting doonce back to 0, and removing the doonce altogether. Strangely enough it doesn't play in a continuous loop if there isn't a doonce statement, it plays the full animation, stops, and allows you to push the switch to run the animation again; same as resetting doonce back to 0. If however I use doonce without resetting back to 0, the switch will only work once. You can get looping animations by running animations you'd expect to see looping although I admit I don't know how that works - how to tell an animation to loop or play once and end.

 

Also, this ':=', I never seen it before but it looks like it can be used to set a variable.

 

As for bug reporting, I'd like to handle that. While it'd be nice to some someone else report the bug for me, I don't like having other people do things for me. It makes me feel like I owe something back in return. My mother, for instance. I get that she's my mother but she spoils me, spending hundreds of dollars that she needs to pay her bills to buy me stuff for my new house; makes me feel bad. As for the wikia, I'm kind of afraid to edit the wikia XD

 

I can copy/paste to/from any text editor. I can? I know I can copy/paste from notepad to wordpad but when I try scripting with the TES Construction Set and I right click to paste copied code or copy existing code nothing happens. Nothing happens when I right click and I don't see any options whatsoever for copy/paste. That's why when people say "Just copy/paste this code" I say wuuuuuuut? If it helps, I'm using the newest version of TES Construction Set.

Edited by DarkSpyda04
Link to comment
Share on other sites

Can't help you with the animations as I don't know much about them.

 

"Let a := b" is the OBSE equivalent to "Set a to b". It does everyting Set does, and also understands all the new concepts introduced by OBSE, like arrays and strings.

 

I added a note to the WIKI article. The WIKI welcomes all contributors and anything one adds there, helps the next reader, so feel free to add relevant information you may find along the way.

 

I suppose you are using the vanila CS, so use Ctrl-V to paste into the script editor code area. If you are planning to use the CS a lot, I suggest you check the Construction Set Extender.

Link to comment
Share on other sites

So it's Ctrl+C to copy and Ctrl+V to paste. Got it. I tried it out and it works fine. I can even paste something from the script onto Wordpad after copying it. This will be very helpful. I'll also be sure to look into the CS Extender. It sounds like there are a lot more concepts I have yet to learn. I've been exposed to arrays and strings in C++ but I don't program quite enough to know my stuff. Plus I'm not entirely sure how they are used in the CS and I can't think of any examples of what they're used for that I couldn't normally do. Is there a reliable article on the wikia that I should check out or are there better resources?

 

It's too bad that you don't know much about animations; I don't, either. But I imagine it's not too difficult to do (If I could figure it out). As I like to say, difficulty is defined by knowledge. Something's only hard to do when you don't know how to do it and you can only hate something if you don't understand it. Once you try out a different and new plate of food, you might turn out to like the flavor. Hopefully it's not too troubling.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...