In my space shooter, I so far have a single powerup weapon.
(event 66)
+ Hero: On collision between Hero and poweruplevel2
-> Hero: Set 'Weapons' to 1
-> poweruplevel2: Destroy
When the item is grabbed, and the weapon enabled, this was the only way I figured to stop it from continuing to drop.
(event 67)
+ Hero: Value 'Weapons' Equal to 1
-> poweruplevel2: Destroy
Then I would allow other powerups to fall and the already enabled ones to not fall. This acceptable or there is a cleaner way?
These are the weapon events for the ship when the above value changes from 0 to 1:
(events 7, 8, 9)
+ MouseKeyboard: On key Space pressed
+ Hero: Value 'Weapons' Equal to 0
+ System: Bullet.Count Lower than 20
-> XAudio2: Autoplay resource "imphenzia_soundtrack_laser36.wav" (No loop)
-> System: Create object Bullet on layer 1 at (0, 0) from Hero 's image point 1
(events 10, 11)
+ Hero: Value 'Weapons' Equal to 1
+ System: Bullet2.Count Lower than 10
-> XAudio2: Autoplay resource "imphenzia_soundtrack_laser36.wav" (No loop)
-> System: Create object Bullet2 on layer 1 at (0, 0) from Hero 's image point 2
-> System: Create object Bullet2 on layer 1 at (0, 0) from Hero 's image point 3