K I just can't figure it out!!!!!!!!!!

I've been trying every which way to do this and still nothing... the closest thing i can come up with is this:


But first, this code checks to see if my player is infront of a block, and if so then turns on the jumping var:
Code:
vec_set(checkaheadtemp,vector(5,0,0));
vec_rotate(checkaheadtemp,my.pan);
vec_add(checkaheadtemp,my.x);
trace_mode = ignore_me + ignore_models + ignore_sprites + use_box;
result = trace(my.x,checkaheadtemp);
if(result>0)&&(vec_dist(my.x,links_temp_jump_pos.x)>5)&&(link_on_ground==0){jump_obstacle=1;}



---------------

now this code, is my attempt at figuring this problem out.. but it works in the reverse, So if the block is higher than my players max jumping height, my player jumps..

Code:
vec_set(checkaheadtemp,vector(5,0,0));//check in front
vec_rotate(checkaheadtemp,my.pan);//in front of me
vec_add(checkaheadtemp,vector(my.x,my.y,my.z+25));//store my.x to my.z + trace height
trace_mode = ignore_me + ignore_models + ignore_sprites + use_box;
result = trace(vector(my.x,my.y,my.z+25),checkaheadtemp);
if(result>0){
	vec_set(checkaheadtemp,vector(5,0,0));
	vec_rotate(checkaheadtemp,my.pan);
	vec_add(checkaheadtemp,my.x);
	trace_mode = ignore_me + ignore_models + ignore_sprites + use_box;
	result = trace(my.x,checkaheadtemp);
	if(result>0)&&(vec_dist(my.x,links_temp_jump_pos.x)>5)&&(link_on_ground==0){jump_obstacle=1;}
}



any more ideas?


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com