Jump to content
Sign in to follow this  
EricM

Leap/Jump script

Recommended Posts

Ok, I've played that VIRUS/Zombie mission where you had those awsome leaps, then I played another Red Hotel Mission (maybe ?) on a server where you could make smaller jumps to go over small obstacles.

I found those scripts really useful/fun (depending on the size of the jump) but I can't find them or any similar yet. I tried to look at the missions in my MP cache but I can't find the scripts either.

Anyone knows how to do that ? Can point me in the right direction ? Give me a link ? Know the authors of those scripts ?

I started to refresh my memory about parabolic equations just in case, but any help would be apreciated.

Thanks

Eric

Share this post


Link to post
Share on other sites

Just un-pbo the missions and you'll find the scripts inside.

Just download the missions from a site somewhere if you can't find the correct ones in your MP-cache.

Un-pbo tools are available at almost every ArmA-site.

Share this post


Link to post
Share on other sites

SIX_DEBUG_MISS=false or true;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">///////////////////////////////////////////////////////////

// ArmA - Jump.sqf v0.2Alpha by Sickboy (sb_at_6thSense.eu)

// Add via addaction

///////////////////////////////////////////////////////////

private ["_pos","_x","_y","_z","_j","_nz","_npos","_dam"];

// Jump Height:

_j=1.8;

_dam=getDammage player;

if(_dam>0.5)then

{

if(SIX_DEBUG_MISS)then{hint "Seek medical Assistance\nCan't Jump!"};

} else {

_pos=getpos player;

_x=_pos select 0;

_y=_pos select 1;

_z=_pos select 2;

_nz=_z + _j;

_npos=[_x,_y,_nz];

if(SIX_DEBUG_MISS)then

{

hint format["Jump!\nPPos: %1\nOPos: %2",_pos,_npos];

};

player setpos _npos;

};

Share this post


Link to post
Share on other sites

Thanks alot mate, you're the man.

Though, I feel dumb now... I thought that would involve trigonometry and parabolic trajectory with initial velocity vector...

Share this post


Link to post
Share on other sites

Sickboy (or anyone),

How do you make this script work? Does it always a player to aways jump like other games, or?

Thanks in advance...

Share this post


Link to post
Share on other sites
Sickboy (or anyone),

How do you make this script work? Does it always a player to aways jump like other games, or?

Thanks in advance...

Look it tells you Add via addaction

Save that load of into into a script file called Jump.sqf

in all the players inits add:

player1 addaction ["Jump","jump.sqf"]

Share this post


Link to post
Share on other sites
Quote[/b] ]Just un-pbo the missions and you'll find the scripts inside.

Thanks, I kind of tried that, but I didn't find a jump.sqs/sqf or leap.sqs/sqf or anything related. Maybe I downloaded the wrong Virus/Zombie mission...

To sickboy : Thank you very much, that will do the trick for now, though you don't get the nice trajectory and acceleration you add in the leaping zombie mission.

I'll try to cook something myself to see if I can do better...

Share this post


Link to post
Share on other sites

Matt,

Excellent, thank you very much.

How does one "Jump" now? Does it just "do it" when necessary, or?

Share this post


Link to post
Share on other sites

I have to say sickboy, this script really kix @ysh but I do have a question for you.

I was wondering if there was a way to make the jump look a bit more realistic such as lowering the players sightline slightly (to simulate bending the knees in preparation for the jump) and then smoothening out the jump animation?

Right now, it appears as if the player instantly goes from ground height to a few feet off the ground and then drops back to the Earth.

Just curious.

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  

×