Jump to content
  • 0
Sargreth

Help with writing script

Question

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

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
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.

Share this post


Link to post
Share on other sites
  • 0
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

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0
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

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By Baboo77
      ENB makes my character's skin look really really pale and kind of makes the entire game look cold.  Which settings would I be looking at to make the colors a little warmer?
    • By MisterMorden
      I see in the guide it says to install LW dawnbreaker with dwarven/dwemer sheath but for the enb light installation instructions is says to choose default dawnbraker sheath and not alt sheath...I was just wondering why that may be. 
    • By DoubleYou
      Discussion topic:
      Cathedral - 3D Tundra Cotton by Dr Jacopo
      Wiki Link
      The vanilla cotton plant is modeled somewhat after a flowering commercial cotton plant: Google Images of cotton plants
      Herbalist's Guide to Skyrim depicts it after the tundra cotton plant, which is more like a grass. Google Images of tundra cotton
      This mod blends the two, giving it the leaves of a commercial cotton plant and the flower of a tundra cotton plant.
      I consider this a significant deviation from vanilla, so I would not recommend for Step, but it looks fantastic.
      Compares:
      Vanilla --> Cathedral Plants --> Hybrid's HD Plants --> Cathedral - 3D Tundra Cotton

       
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.