GetVelocity z >= 10.0000 registers jumping...not!

Post » Sat Nov 17, 2012 6:58 am

I've build a feature into one of my mods that eatsa stamina whenever you jump. What I did was making a detrimental spell that drains stamina and flaged it with the condition...

GetVelocity z >= 10.0000

...this seem to do the trick, but unfortunately it only works randomly. I've implied a second condition...

IsSwimming == 0.0000

...to make sure not to loose any stamina when emrging from the bottom of a sea

Is there any other condition that works better then GetVelocity? I've tried GetPlayerAction, where 5 seems to be jumping, but it didn't work.

Any idea why this only randomly drains stamina?
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Sat Nov 17, 2012 5:05 pm

Could you track animation events?
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Sat Nov 17, 2012 1:24 pm

Yeah I think tracking animations would be a much better way if you could do it.

Tracking velocity could be iffy, because if the player goes up a very steep slope very quickly it may think they're jumping.
User avatar
Shannon Marie Jones
 
Posts: 3391
Joined: Sun Nov 12, 2006 3:19 pm

Post » Sat Nov 17, 2012 2:53 am

I've tried that...I guess...but I couldn't figure how to do it correctly. Animation is handled via numbers, but the animations don't have any indexed numbers showen, so it's hard to figure which is the one responsible for jumping.
User avatar
Sian Ennis
 
Posts: 3362
Joined: Wed Nov 08, 2006 11:46 am

Post » Sat Nov 17, 2012 9:16 am

Tracking velocity could be iffy, because if the player goes up a very steep slope very quickly it may think they're jumping.

Not totally inappropriate IMHO. *EDIT: On horseback or any kind of vehicle would most likely ruin this. Plus Dragonborn DLC..........

You might be able to ask http://www.gamesas.com/user/793793-verteiron/ about the correct event name. I would try this:

RegisterForAnimationEvent(PlayerRef, "ActionJump")   Debug.Notification("Registered Jump")
User avatar
Svenja Hedrich
 
Posts: 3496
Joined: Mon Apr 23, 2007 3:18 pm


Return to V - Skyrim