Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Create event:
  2. var can_be_picked_up = true
  3.  
  4.  
  5. Collision with the player event:
  6. can_be_picked_up = false
  7. alarm[0] = 300 // This is the "cooldown" time in "steps" or frames. If you want to use seconds, put (5 * room_speed). This way you don't have to rewrite everything when you change fps from 30 to 60 or anything else
  8. /*Code that gives the power-up to the player*/
  9.  
  10.  
  11. Draw event:
  12. if (can_be_picked_up): draw_self // Act as if everything was normal if it can be picked up, don't draw anything if not available
  13.  
  14.  
  15. Alarm[0] event:
  16. can_be_picked_up = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement