Nuclear Throne style upgrades

Screenshot 2023-01-08 082200
this may be a loaded question but I was wondering how could you make a upgrade system like nuclear throne where it gives you random upgrades and once you pick one they can’t show up again for the run. also so that they can’t show up multiple times on the selection screen.

I haven’t created it but I assume this is one possible system that could work.

  • Every upgrade is created off screen with each item having a global Boolean. If the Boolean is false it’s deleted.

  • After that it moves 4 random upgrades to a reachable area and deletes the rest.

  • when you pick up an upgrade it sets it’s global Boolean to false.

Even if this system would work it would be very unoptimized and time consuming to add upgrades, so I was wondering if anyone knew of a better way to do this.

Give an ID number to each, store them and check if they have been popped/used.
You may need to use loop events and dynamic access to achieve that.
https://wiki.gdevelop.io/gdevelop5/events
https://wiki.gdevelop.io/gdevelop5/all-features/variables#accessing_child_variables_dynamically

1 Like