Now I was trying to figure this out but in Zelda Code I don't understand what is happening :
IF (movement_mode == 2) { //pulling yourself up onto a ledge
my.z += 5 * time;
player_diff.x = 1;
player_diff.y = 0;
player_diff.z = 0;
ent_move(player_diff.x,nullvector);
vec_set(temp,my.x); //scan in front of player to see if there is a climbable wall
temp.x += 30 * cos(my.pan);
temp.y += 30 * sin(my.pan);
temp.z = my.z - player_feet_height; //set the value 32 to the distance to the models feet
trace_mode = ignore_me+ignore_sprites+ignore_models;
IF(trace(my.x,temp) == 0) {
movement_mode = 3;
vec_set(ladder_x.x,my.x);
}
// camera.z = player.z - sin(cam_zangle) * cam_height;
ent_cycle("walk",my.animdist);
my.animdist += 9 * time;
IF (my.animdist > 100) { my.animdist -= 100; }
center_check();
update_views();
}
now the first couple of lines are good but then how do we (SCAN) or (TRACE) in order to know that this is an edge?