Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //jumping
- if keyboard_check(ord('X')){
- my_state = 1;
- zaxis_speed = jump_speed;
- audio_play_sound(sfx_jump,0,false);
- }
- //it's gravity!
- if(zaxis_speed<10){
- zaxis_speed += grav_speed;
- //z position on floor, radicool!
- if (my_z+zaxis_speed > my_ground_z){
- zaxis_speed = 0;
- my_z = my_ground_z;
- }
- x += hor_speed *hor_count;
- y += ver_speed *ver_count;
- my_z += zaxis_speed;
- my_state = 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement