Posted By: Tman
[SOLVED]My.z = You.z not working properly - 04/14/10 20:10
I have a script where he connects to a object that is identified by the objects id. I set the z up to 50 so it appears that he is hanging on the ledge, the problem comes after I move to the right and the ledge is hanging over the water he just falls off for some reason. I set the water as a solid object thinking that gravity was pulling me away but when I am over the ground he stays on the ledge anyone has an idea of what is happening?
Here is the portion of the code that I am using I may be using my.z = you.z wrong but could someone help please?
Code:
// we are at the ledge and the result is greater than zero if(result > 10 && you) { //check to make sure we have hit the target //and we have the correct ledge if(you.skill100 == 1502 && HIT_TARGET) { my.z = you.z + 50; clamp(my.x,you.x,50); ent_animate(me,"ledgeShimy",NULL,0); if(key_r == 1 || key_l == 1) { my.ANIMATION += 5* time_step; // my.ANIMATION %= 100; ent_animate(me,"ledgeShimy",my.ANIMATION,ANM_CYCLE); } //small check points as of now to debug our results //draw_point3d(hit.x,vector(50,50,255),100,3); draw_text("Wall Hit...",10,10,vector(50,50,255)); } }
Here is the portion of the code that I am using I may be using my.z = you.z wrong but could someone help please?