Advertisement
Guest User

dash

a guest
Apr 13th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create event:grav=0.2;
  2. hsp = 0;
  3. vsp =0;
  4. jumpspeed = 4;
  5. movespeed = 4;
  6. dashspeed = 10;
  7. candash = false;
  8. alarm[1] = room_speed*3;
  9.  
  10. step event:
  11. key_right = keyboard_check(vk_right);
  12. key_left = -keyboard_check(vk_left);
  13. key_jump = keyboard_check(vk_space);
  14. move = key_left + key_right;
  15.  
  16. if (keyboard_check_pressed(ord('A'))&&(candash==false))
  17. {candash=true;}
  18.  
  19. if (candash == true)
  20. {
  21. grav=0.1;
  22. movespeed=10;
  23. if(vsp<15) {vsp +=grav;}
  24. }
  25.  
  26. if (candash == false){
  27. movespeed =4;
  28. grav=0.2;
  29. if (vsp<10) {vsp +=grav;}
  30. }
  31. hsp = move*movespeed;
  32.  
  33.  
  34. Alarm event: candash=false;
  35. hsp = move*movespeed;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement