Jump to content

need help with script, is there a way to active something when jumping?


Angeli

Recommended Posts

Posted

Hi all:

 

is there a way to write script in a way that detects when player is jumping? 

I am trying to make a mod which an armor has a visual effect that actives when player/wearer  jumps. I am not sure how to script it. I tried "onkeydown" but it doesn't seems to work with spacebar.

 

I also heard of 

OnAnimationEvent

but not sure if it would work or what event name is for jumping.

 

 

Thanks. 

Posted

You can use RegisterForControl. Then you won't have to worry about the player remapping keys or using a gamepad. (Requires F4SE)

 

RegisterForControl("Jump")

Event OnControlDown(string control)
   If (control == "Jump")
      ;Your Code
   EndIf
EndEvent

 

Posted

RegisterForAnimationEvent(playerref,"JumpUp")
RegisterForAnimationEvent(playerref,"JumpLandEnd")

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
     If(asEventName == "JumpUp")

I think jump button can be triggered while the charracter is not able to jump, so this script whould not have that problem

 

Archived

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

  • Recently Browsing   0 members

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