Advertisement
Guest User

Untitled

a guest
May 24th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. ///movimentos
  2.  
  3. if (global.cima and no_piso) {vspeed -= 5 }
  4. if place_free(x, y+1) {
  5. vspeed = vspeed/2
  6. global.cima = false}
  7.  
  8.  
  9. if (global.direita and place_free(x + 4, y)) {
  10. x -= 10
  11. global.virado_direita = false
  12. global.virado_esquerda = false
  13. sprite_index = spr_andando
  14. image_xscale = -1
  15. image_speed = 3 }
  16.  
  17. if (global.esquerda and place_free(x + 4, y)) {
  18. x += 10
  19. global.virado_direita = false
  20. global.virado_esquerda = false
  21. sprite_index = spr_andando
  22. image_xscale = +1
  23. image_speed = 3 }
  24.  
  25. if global.virado_esquerda {
  26. sprite_index = spr_parado
  27. image_xscale = +1
  28. }
  29. if global.virado_direita {
  30. sprite_index = spr_parado
  31. image_xscale = -1
  32. }
  33. else{
  34.  
  35.  
  36. if place_free(x, y +2) {//se a area a 2 pixels estiver livre ele trocara a sprite para spr_pulo
  37. sprite_index = spr_pulo
  38. image_speed = 0.5
  39. }
  40. if !place_free(x, y +2) and sprite_index=spr_pulo{// se a area a 2 pixels estiver ocupada ele mudara a sprite
  41. sprite_index = spr_parado
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement