Guest User

Untitled

a guest
Jul 9th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. //Variables you can modify
  2. keyLeft = vk_left; //Key to move left
  3. keyRight = vk_right; //Key to move right
  4. keyJump = vk_shift; //Key to jump
  5. keyRun = vk_control; //Key to run
  6.  
  7. if (keyboard_check(keyRight))
  8. {
  9. sprite_index = sprPlayerRun;
  10. image_xscale = 1;
  11. }
  12.  
  13. if (keyboard_check(keyLeft))
  14. {
  15. sprite_index = sprPlayerRun;
  16. image_xscale = -1;
  17. }
  18.  
  19. fric = 0.1; //Friction: the acceleration of the player
  20. slow = 0.1; //The deacceleration of the player
  21. maxSpeed = 2; //Maximum speed while not running
  22. maxSpeedRunning = 4; //Maximum speed while running
  23. jumpHeight = 7; //How high the player can jump
  24. _gravity = 0.25; //The gravity the player has
  25.  
  26.  
  27. //Variables you don't want to mess around with
  28. view_object = id; //Makes sure the view is following the player
  29. ground = true; //We are on the ground on default
  30. global.vel = 0; //Our starting horizontal speed is 0
  31. vspeed = 0; //Our starting vertical speed is 0
  32. slowSlope = false; //We are not going slow up a slope
  33. fastSlope = false; //We are not going fast down a slope
  34. slopeAmount = 0; //We are not on a slope yet, so the slowness/speed factor of a slope is 0
  35. canhit = true; //We can get hit
Advertisement
Add Comment
Please, Sign In to add comment