Jump to content

Question

Posted

Hello, trying to learn at scripting, can anyone help with some of them? It must be event that makes player or npc playing animation (like wounded_03 anim and etc - and be looping - start-> playing anim-> exit) when object/armor equipped before it being unequipped, I tryied to do it self but have no effective result

4 answers to this question

Recommended Posts

  • 0
Posted
4 hours ago, Sargreth said:

Hello, trying to learn at scripting, can anyone help with some of them? It must be event that makes player or npc playing animation (like wounded_03 anim and etc - and be looping - start-> playing anim-> exit) when object/armor equipped before it being unequipped, I tryied to do it self but have no effective result

 

I've never done animations before so I might not be any help, but I can try. You'll need to post or link to the script.

  • 0
Posted
11 minutes ago, TechAngel85 said:

I've never done animations before so I might not be any help, but I can try. You'll need to post or link to the script.

Spoiler

Scriptname EFidle extends ActiveMagicEffect  

Idle  Property EFidle Auto
Idle    Property IdleStop_Loose Auto
event OnEffectStart(actor akTarget, actor akCaster)
    akTarget.PlayIdle(EFidle)
endEvent
event    OnEffectFinish(actor akTarget, actor akCaster)
    akTarget.PlayIdle(IdleStop_Loose)
endEvent

Thanks for answer, script must looks like that script, but must work when item is equipped, not magic effect

  • 0
Posted

I would have to play to see how to get something like that to work. You'll have to use the an Equipped event since that is the event you're wanting to enact your animation:

Scriptname MyScript extends ObjectReference

ObjectReference Property ItemX Auto
Actor Property PlayerRef Auto

Event OnObjectUnEquipped(Form akBaseObject, ObjectReference akReference)
If akBaseObject == ItemX
SendAnimationEvent(PlayerRef, "animationName")
EndIf
Utility.Wait(20) ;time it takes to finish the animation
PlayerRef.PlayIdle(IdleStop_Loose) ;this prevents the actor from getting stuck in an animation loop
EndEvent

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
If akBaseObject == ItemX
SendAnimationEvent(PlayerRef, "animationName")
EndIf
Utility.Wait(20) ;time it takes to finish the animation
PlayerRef.PlayIdle(IdleStop_Loose) ;this prevents the actor from getting stuck in an animation loop
EndEvent

References:
https://ck.uesp.net/wiki/OnObjectEquipped_-_Actor
https://ck.uesp.net/wiki/OnObjectUnequipped_-_Actor
https://ck.uesp.net/wiki/SendAnimationEvent_-_Debug

Granted, that is all just an entirely untested guess and I could be totally off. I'm not the best to help with this one. It'll take some research and a lot of testing. My other suggestion would be to ask on one or two popular Discords servers.

  • 0
Posted
10 minutes ago, TechAngel85 said:

I would have to play to see how to get something like that to work. You'll have to use the an Equipped event since that is the event you're wanting to enact your animation:


Scriptname MyScript extends ObjectReference

ObjectReference Property ItemX Auto
Actor Property PlayerRef Auto

Event OnObjectUnEquipped(Form akBaseObject, ObjectReference akReference)
If akBaseObject == ItemX
SendAnimationEvent(PlayerRef, "animationName")
EndIf
Utility.Wait(20) ;time it takes to finish the animation
PlayerRef.PlayIdle(IdleStop_Loose) ;this prevents the actor from getting stuck in an animation loop
EndEvent

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
If akBaseObject == ItemX
SendAnimationEvent(PlayerRef, "animationName")
EndIf
Utility.Wait(20) ;time it takes to finish the animation
PlayerRef.PlayIdle(IdleStop_Loose) ;this prevents the actor from getting stuck in an animation loop
EndEvent

References:
https://ck.uesp.net/wiki/OnObjectEquipped_-_Actor
https://ck.uesp.net/wiki/OnObjectUnequipped_-_Actor
https://ck.uesp.net/wiki/SendAnimationEvent_-_Debug

Granted, that is all just an entirely untested guess and I could be totally off. I'm not the best to help with this one. It'll take some research and a lot of testing. My other suggestion would be to ask on one or two popular Discords servers.

Ill would try it, thank you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.