Hey George,
I will keep improving the game level and the design wink

I made some tests, but no good result yet. Here is part of my player script:

FIRST PROBLEM smile

Code:

vec_set(temp.x, my.x);
temp.z -= 5000 * time_step;
ground_distance = c_trace(my.x, temp.x, IGNORE_PASSABLE | IGNORE_SPRITES | SCAN_TEXTURE);
if (hit.texname == "ROCK_03.bmp"){
	set (mypanel, VISIBLE);
} else {
	reset (mypanel, VISIBLE);
}
// JUMPING
if (key_space && jump_key == 0) {
	jump_height = minv(120, jump_height + 12 * time_step);
	if (jump_height == 120){
		jump_height = maxv(120, jump_height - 10 * time_step);
		jump_key = 1;
	}
} else {
	jump_height = maxv(0, jump_height - 10 * time_step);
	if (jump_height == 0 && !key_space){
		jump_key = 0;
	}
}
if (jump_animation < 99 && jump_height > 0){
	jump_animation += 4 * time_step;
	ent_animate(my, "jump", jump_animation, ANM_CYCLE);
} else {
	jump_animation = 0;
}
// NORMAL MOVES
if ((key_w + key_s) && key_shiftl) { //RUNNING
	movement_speed.x = 20 * (key_w - key_s) * time_step;
	movement_speed.y = 0;
	if (jump_height < 1){
		anim_percent += 11 * time_step;
		ent_animate(my, "run", anim_percent, ANM_CYCLE);
		if (step_sound < 1) {
			ent_playsound (my, wav_passo_mato, 300);
			step_sound = 55;
		}
		else {
			step_sound -= 3;
		}	
	}
} else {
	if ((key_w + key_s) || (key_a + key_d)) { //WALKING FRON, BACK, SIDES
		movement_speed.x = 3 * (key_w - key_s) * time_step;
		movement_speed.y = 3 * (key_a - key_d) * time_step;
		if (jump_height < 1) {
			anim_percent += 6.5 * time_step;
			ent_animate(my, "walk", anim_percent, ANM_CYCLE);
			if (step_sound < 1) {
				ent_playsound (my, wav_passo_mato, 300);
				step_sound = 60;
			}
			else {
				step_sound -= 2;
			}	
		}
	} else { //STAND
		movement_speed.x = 0;
		movement_speed.y = 0;
		if (jump_height < 1) {
			anim_percent += 2 * time_step;
			ent_animate(my, "stand", anim_percent, ANM_CYCLE);	
		}
	}
}
movement_speed.z = -(ground_distance - 28) + jump_height;
movement_speed.z = maxv(-25 * time_step, movement_speed.z);
c_move (my, movement_speed.x, nullvector, IGNORE_PASSABLE | GLIDE);


I tried editing the first temp.z -=5000, but no succeed. I also tried to change the movement_speed.z... I think this is the problem, in this part of script... but I cant figure out how change... If my player start to jump from beginning of mountain, his jump height will not be too much high, so he starts to fall sudenly. If the jump height is at max, then I can move the jump to forward and then its good (sorry my english).

SECOND PROBLEM smile

I try to use the SCAN_TEXTURE now, buuutt... as you can see in the code above, I did that commands, but it returns an error saying that "Syntax error: CANT CONVERT EQ:POINT:ARRAY:LONG"... what I did wrong? If I let this line "if (hit.texname == "ROCK_03.bmp")" to this "if (hit.texname = "ROCK_03.bmp")" the script runs, but mypanel is always visible, so it is not working as expected.

Thanks again wink

Last edited by xandeck; 03/20/09 12:55.

XandeCK
Lead Developer
JogadorVIP.com