jumping as walking

ABK

Well-known member
I want to make walk by jumping forward but when i insert jumpframe into walk then i can walk in the air by pressing forward button fast cause jumpframe gets repeated in first frame, so... whats the best way to make something like this ? I also have problem with camera moving up during jumpframe in walking anim, id like it to stay stable and ignore jumpframe.
 
First of all it is not possible to walk in air because the animation can be interrupted. Maybe you can make the move an attack animation, for example use performattack to switch to a fake leap forward animation so you don't stop in mid-air.

As for the camera issue, there's no real easy solution, maybe you can use offset trick to simulate jump, though it is not as good.
 
the problem is, i want to walk up and down as well in diagonals with jump, so looks like its not that easy to do, i can make fake jump forward move but i need also jumping into every other directions.
Jumpframe gives me fluid animation and making it with offsets wouldnt look as good.
 
Well ive got it working but now the problem is that camera follows character up/down with every jumpframe so there is no way to change that with script ?
Also in spawn animation ive got my character jumping down but i would like camera not to follow character when hes doing this(my char gets moved very high in first spawn frame so he can jump down and camera follows when i move my character very high offscreen which isnt nice sometimes), option to lock the camera during some animations would be nice.
 
Great that You had it working noob and did not bother to post the script,...
Anyone have any experience with jumping as walking ? In all directions, so when you stop pressing keys it will still continue to jump but maybe not move in any direction and fall down.
 
bWWd said:
Great that You had it working noob and did not bother to post the script,...
Anyone have any experience with jumping as walking ? In all directions, so when you stop pressing keys it will still continue to jump but maybe not move in any direction and fall down.

Hi bWWd
Maybe it can help you. It is an animation script that I use to give mobility in any animation and in every direction, even if the player is in the air. All you need is to paste the code in your animations.c file and repeat the command "@cmd keyMove xVel zVel" in all frames of the desired animation. You can define the X/Z velocity to any value you want.

Code:
void keyMove(float xVel, float zVel)
{//Move entity if direction button is pressed
	void self 	= getlocalvar("self");
	int iPIndex	= getentityproperty(self,"playerindex"); //Get player index
	float xdir	= 0;
	float zdir	= 0;

	if(xVel != 0){
		if(playerkeys(iPIndex, 0, "moveleft")){// Left is pressed?
			xdir = -xVel;
		}else if(playerkeys(iPIndex, 0, "moveright")){// Right is pressed?
			xdir = xVel;
		}
	}else{
		xdir = NULL();
	}
	
	if(zVel != 0){
		if(playerkeys(iPIndex, 0, "moveup")){// Up is pressed?
			zdir = -zVel/2;
		} else if(playerkeys(iPIndex, 0, "movedown")){// Down is pressed?
			zdir = zVel/2;
		}
	}else{
		zdir = NULL();
	}

	changeentityproperty(self, "velocity", xdir, zdir);
}
 
bWWd said:
Anyone have any experience with jumping as walking ? In all directions, so when you stop pressing keys it will still continue to jump but maybe not move in any direction and fall down.

I prefer to disable WALK and use other animations such as FOLLOWs or FREESPECIALs as the jumpwalk, whatever you call it. Then I add script in IDLE to change into those jumpwalk animations.
Keyscript is needed to perform attack while in jumpwalk. As for jumping, that depends on your decision. Do you allow this character to jump when it's at it peak while jumpwalking?
 
Back
Top Bottom