Jump to content
Sign in to follow this  
iceman77

-Snippet- Jump Action (For all you BF Flippers)

Recommended Posts

After looking in the configuration, I noticed BI still hasn't given us the ability to hurdle stuff on the fly. Aside from the step-over animation with the V key. Or am I wrong :confused:. Anyhow, this is a pretty neat animation. It siphons a shit ton of stamina when used. Oh lord I'll feel silly if this is already a default action LOL. Cheers.

// Shift + T to jump (running too)
waitUntil {!(isNull (findDisplay 46))};
(findDisplay 46) displayAddEventHandler ["keyDown",{
if (
	(_this select 1) isEqualTo 20 &&
	(_this select 2)
   ) exitWith {
	if ( (getFatigue player) < 0.4) then {
		player playMoveNow "AovrPercMrunSrasWrflDf";
	} else {
		titleText ["Not enough stamina","PLAIN DOWN"];
	};
	true
};
}];

Edited by Iceman77

Share this post


Link to post
Share on other sites

Nope this isn't a default action as far as I know either, only place I've seen it is in AGM (which is a mod) so it's nice to see a script version too :D.

Share this post


Link to post
Share on other sites

Just tested it. The player is firstly "jumping" prone, doing the "take out rifle" action, then gets up again, walks a few steps to the front left and then hops. I don't believe that's the way it's intended, is it?

Share this post


Link to post
Share on other sites

Hmm. I'm testing in the editor with an independent rifleman. Start running with shift + W then hit T. Works fine. If you just sit there and hit shift + T it may look wonky. Or if you start prone or kneel it may look wonky.

Edited by Iceman77

Share this post


Link to post
Share on other sites
Nope this isn't a default action as far as I know either, only place I've seen it is in AGM (which is a mod) so it's nice to see a script version too :D.

There's a couple others too but (and I don't remember 100%) AGM might be the only one that uses default step over when walking and vaulting when jogging/running - via the same default key.

Share this post


Link to post
Share on other sites

Hmm that's a good idea. Maybe I could have different animations for varying speed and maybe even some more different ones for varying stamina also.

Share this post


Link to post
Share on other sites
Hmm. I'm testing in the editor with an independent rifleman. Start running with shift + W then hit T. Works fine. If you just sit there and hit shift + T it may look wonky.

Actually, I placed it onto my space button, but I'm running with double "W" pressed before pressing space.

EDIT:

Same result with SHIFT + T. I might have to add that my keyboard layout is 99% custom, but that shouldn't matter as the key handler returns true in that case.

Share this post


Link to post
Share on other sites

Ahh. Well the best way I could get it to work is with the shift + T (unused binding). I was gonna use space bar but couldn't override the default action of the space bar key. As it's tied to all sorts of shit already. Producing unwanted results when I would go to jump.

note: I may set it up for the custom user action keys.

/troll more btw walty :)

Share this post


Link to post
Share on other sites

Ahh nice. Hadn't realized there are already scripts for this. Oh well. Snippets are nice :p

Edited by Iceman77

Share this post


Link to post
Share on other sites
Ahh nice. Hadn't realized there are already scripts for this. Oh well. Snippets are nice :p

It's quite an old script, I'm sure the community would appreciate a better one ... Perhaps something to use as a reference though.

as per PMs

Edited by MDCCLXXVI

Share this post


Link to post
Share on other sites

Assuming these are all stock default animations, I do have to wonder why the actions to support them are not included in the game itself.

Share this post


Link to post
Share on other sites
Assuming these are all stock default animations, I do have to wonder why the actions to support them are not included in the game itself.

BI has to leave some work for us :D.

Share this post


Link to post
Share on other sites
Assuming these are all stock default animations, I do have to wonder why the actions to support them are not included in the game itself.

Well, the animation I posted is a vanilla animation. I was actually looking for another animation and seen that one. I was like wth.. that's a pretty neat animation and be perfect for making a jump script.

Share this post


Link to post
Share on other sites

Maybe the code should check stance, weapon and speed also. The animation is only for primary weapons. And starting from prone or standing looks funny.

BTW, how do you check which weapon is active? Primary or sidearm/launcher?

Share this post


Link to post
Share on other sites

Pretty much. I suppose you could just use a different animations based on what weapon the player has (if any), what his stance is, and how fast he is traveling.

Share this post


Link to post
Share on other sites
Pretty much. I suppose you could just use a different animations based on what weapon the player has (if any), what his stance is, and how fast he is traveling.

Yeah, that's what I meant. Because there is a jump animation only for running with primary weapon, your snippet shouldn't allow jumping without it.

... if ( (getFatigue player) < 0.4 && (stance player) == "STAND" && (speed player) > 9 && (currenWeapon player) isEqualTo (primaryWeapon player)) then { ...

Share this post


Link to post
Share on other sites

Exactly. Feel free to add onto the snippet. Post any updates here or in a new thread. Atm I can't be bothered. It was an animation I found by accident while searching for others in the animation's viewer. I figured it'd make for some good conversation in any case. Cheers.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×