daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 60 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. press_right = keyboard_check(vk_right);
  2. press_left = keyboard_check(vk_left);
  3. press_jump = keyboard_check_pressed(vk_space);
  4.  
  5.  
  6. var move = press_right - press_left;
  7. hspd = move * walkspd;
  8. vspd = vspd + grav;
  9.  
  10. if (place_meeting(x, y + 1, oNeige)) && (press_jump)
  11. {
  12.     vspd = -7;
  13. }
  14.  
  15. // Collison Horizontales
  16.  
  17. if (place_meeting(x + hspd, y, oNeige))
  18. {
  19.     while (!place_meeting(x + sign(hspd), y, oNeige))
  20.     {
  21.         x = x + sign(hspd);
  22.     }
  23.     hspd = 0;
  24. }
  25. x = x + hspd;
  26.  
  27. // Collision Verticales
  28.  
  29. if (place_meeting(x, y + vspd, oNeige))
  30. {
  31.     while (!place_meeting(x, y + sign(vspd), oNeige))
  32.     {
  33.         y = y + sign(vspd);
  34.     }
  35.     vspd = 0;
  36. }
  37.  
  38. y = y + vspd;
  39. {
  40.    
  41. if  (hspd != 0) image_xscale = sign(hspd);
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top