Jump to content

Forcing idle animation with a spell.


Recommended Posts

I can't figure out how to do this simply. It sounds simple enough, but everywhere I've looked it seems overly complicated, for one animation. Maybe Labrat is lurking around with his animating genius. :dodgy:

 

It's a simple concept. A lesser power to activate an idle anim on npc touch. (Also self cast for that matter, so two spells really.) Of course, an if statement could make him stop perhaps.

 

So, does the spell script need to add a token to the npc? This is one place I get fuzzy. All the examples I read have you naming a specific npc. This should work on -any- npc I cast it on.

 

So essentially:

 

Cast on touch

activate idle anim

activate sound

cast on touch again will end it.

 

fairly simple -sounding- but why can't I find an example of it? >.<

 

edit: I've heard about playidle for obse20, but I can't seem to figure out how to use that for the spell.

 

Update: I figured out how to add the spell when the game starts, unfortunately, the idle anim was already playing on npc's before I ever cast anything. >.< Of course, I'm certain I scripted it wrong, since I feel fairly clueless.

 

scriptname AmeHarpTarget

short updateCount
ref anim

Begin ScriptEffectStart
set anim to AmeHarp
 playidle anim 1
End

 

The script of course did have an error, though it compiled. On line one, the error was "Variable 'UpdateCount' unreferenced in local context."

 

I don't know if this is what caused all the npc's to play the idle, spell or not though.

Link to comment

Right, so got the animation itself working with the spell, I just need to script in the sound to go with it. I've tried various ways, but it either ignores the sound and just plays the anim, or crashes.

 

Here's the working idle anim script that I attached to the spell.

 


scn AmeHarpTarget
ref anim
short doonce
begin gamemode
If DoOnce == 0 
	set anim to AmeHarp	
	playidle anim 1	
endif
end

 

Atleast I'm getting somewhere! Now if I can just attached the sound to that script, id be golden. >.<

Link to comment

More progress! I have both the music and the animation working, for both a spell cast on player, and npc. My only issue now is how to stop it. For the self spell, the animation gets stuck, and won't go away. >.<

 

I tried making an item that I could activate to have it pick the default idle, but that's not working for some reason.

 

Here's the working script meant for NPCs :D

 


scn AmeHarpTarget
ref anim
   short doonce
begin gamemode
   If DoOnce == 0 
       set anim to AmeHarp    
       playidle anim 1    
EndIf
end
Short PlayOnce
Begin gamemode
       If (PlayOnce == 0)
	PlaySound AmeHarpMusic
	Set PlayOnce to 1
       Endif
end

 

Here's the bit of script I attached to a random misc item, but it does absolutely nothing. :/

 

scn AmeResetIdle
Short DoOnce
Begin GameMode
If DoOnce == 0
	Player.PickIdle
EndIf
End

 

Inching closer towards getting it done though!

Link to comment

I really hope you succeed with this. What particular idle animation do you have in mind for this?

 

Such technical/scripting stuff is totally beyond me, so please excuse if I'm way off here - but can't you just look into the script of a pose mod which has real animations instead of static poses, eg 'Umpa Animations'? Maybe you'll find a clue there for the command to stop an animation.

Link to comment

I really hope you succeed with this. What particular idle animation do you have in mind for this?

 

Such technical/scripting stuff is totally beyond me' date=' so please excuse if I'm way off here - but can't you just look into the script of a pose mod which has real [i']animations[/i] instead of static poses, eg 'Umpa Animations'? Maybe you'll find a clue there for the command to stop an animation.

 

Ahh! I didn't think about Umpa Animations. I disregarded Umpa because all I ever think about is pose mods. xD I'll have a look. Part of the problem is sifting through the code to get the part I need, since I know his animations/poses are menu based, and this is just a single animation activated by a spell. Another issue I may have is Umpa may be doing animations/poses, the old way. Which involves tokens and the pickidle system. I'm doing this with playidle from OBSE 20, which starts things off different. We shall see though!

 

As for what I'm doing with this project. I'm working on a mod for an animated harp. I started out with Reaper's animated lute as a base, but it's slowly changed until I'm not using anything of his, and have someone helping with the animation, so the harp is held properly, and the strings plucked. Of course, another difference between this and Reaper's lute is the fact that you can make NPC's play the harp. Also, you get the spells on startup, rather than having to buy them. So far, I feel it's less clunky. You don't get a menu asking if you want to play, you just shoot a spell at someone, or cast it on yourself, and off it goes. :)

 

Once I'm done I'll definantly be posting this in the non adult mods section for everyone.

Link to comment

Yes, pose mods and Umpa's animations are using this 'Pickidle' thingy. I didn't even know there's another system!

 

I remember reading about your mod idea in another thread. Awesome project! This is something I'm really looking forward to.

My only experience with musical animations was the lute playing included in 'Personality Idles 4', but I had to get rid of that mod for some reason I already forgot. Playing a harp is so much better anyway! Makes me want to create a real bard character.

 

Good luck getting your mod to work! I guess it's eagerly anticipated by a lot of people.

Link to comment

Yes' date=' pose mods and Umpa's animations are using this 'Pickidle' thingy. I didn't even know there's another system!

 

I remember reading about your mod idea in another thread. Awesome project! This is something I'm really looking forward to.

My only experience with musical animations was the lute playing included in 'Personality Idles 4', but I had to get rid of that mod for some reason I already forgot. Playing a harp is so much better anyway! Makes me want to create a real bard character.

 

Good luck getting your mod to work! I guess it's eagerly anticipated by a lot of people.

[/quote']

 

Thanks! I think I'm getting closer to it working. I downloaded Umpa Animations, but there wasn't much I could use, unfortunately. I tinkered with my script, made the reset animation item a ring to be equipped and unequipped. It's working now. So, all I need now is to get the proper animation for it, and it's good to go. :)

 

Some odd things happened in my quest to get the animation to stop. I tinkered with the self script, and somehow, if I had my animation going, and talked to an npc, the animation would transfer off of me to the npc. It was the oddest thing. I fixed it though. xD

 

Are you familiar with the song "All the pretty horses"? That's the music I have set to harp. I thought it was nice and relaxing, plus fit the medievalesque (Hey new word?) theme I was going for. I need a mod with some mens medieval tunics and formal wear, and some victorian era clothing, I think that would complete the look of a bard nicely. xD

 

I'm so glad I'm getting close to finishing the scripting. Scripting confuses the hell out of me.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use