Thnx all. Now i get the entity to move up the stairs. Both methods works:

1. Putting the entity's origin at its body center.
2. and the method of Germanunkol using-1*time_step.

But now, if i put the code to put back the entities to the ground it stops climbing up. with both methods.

here is the rectified code:

Code:
c_move (my, vector(7 * time_step, 0, 0), nullvector, GLIDE);

	trace1 = c_trace(vector(my.x,my.y,my.z), vector(my.x+20,my.y,my.z), IGNORE_CONTENT);
	trace2 = c_trace(vector(my.x,my.y,my.z), vector(my.x+20,my.y,my.z+100), IGNORE_CONTENT);
	
	if(trace1 > 0 && trace2 = 0)
		my.z += 100;
	

	//keeping entity on ground
	c_trace(my.x,vector(my.x,my.y,my.z-1000),IGNORE_ME|IGNORE_SPRITES|IGNORE_CONTENT);
	my.z = hit.z - my.min_z;



if i remove the code for keeping entity on ground, then it can climb. with that it doesnt. even if i use the method by Germanunkol.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook