daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Feb 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Create:
  2.  
  3. image_index=spr_point
  4. hspeed=-0.7
  5. image_speed=0.5
  6. broke=false
  7.  
  8. Step:
  9.  
  10. //Player catching it
  11.  
  12. if place_meeting(x,y,obj_player1)
  13. {
  14.     global.p1score+=50
  15.     instance_destroy()
  16. }
  17.  
  18. //Breaking on a wall
  19.  
  20. if place_meeting(x,y,obj_wall) or place_meeting(x,y,obj_turret)
  21. {
  22.     image_index=spr_pointbreak
  23.     hspeed=0
  24. broke=true
  25. }
  26.  
  27. Animation End:
  28.  
  29. if image_index=spr_pointbreak
  30. {
  31.     instance_destroy()
  32. }
  33.  
  34. Draw:
  35.  
  36. if broke=false
  37. {
  38.     draw_sprite(spr_point,image_index,x,y)
  39. }
  40.  
  41. else if broke=true
  42. {
  43.     draw_sprite(spr_pointbreak,image_index,x,y)
  44. }
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