Angeli Posted September 14, 2019 Posted September 14, 2019 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.
Carabosse Posted September 14, 2019 Posted September 14, 2019 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
Mr. private Posted September 14, 2019 Posted September 14, 2019 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.