Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Check for ground
- if (place_meeting(x, y+1, obj_wall)) {
- vspd = 0;
- sprite_index = walk;
- airjump = 1;
- // Jumping
- if (jump_key) {
- vspd = -jspd;
- audio_play_sound(snd_jump, 5, false);
- }
- } else {
- // Gravity
- if (vspd <= 10) {
- vspd += grav;
- }
- sprite_index = jump;
- // Check For Double Jump
- if (airjump > 0) {
- if (jump_key) {
- vspd = -jspd/1.2;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement