Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create event:
- var can_be_picked_up = true
- Collision with the player event:
- can_be_picked_up = false
- 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
- /*Code that gives the power-up to the player*/
- Draw event:
- 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
- Alarm[0] event:
- can_be_picked_up = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement