Hello everyone!
I'm in trouble with a function problem. I have for my game two slots for my power-ups. Each one can be activated with a button, "Y" for slot_1 and "B" for slot_2.
Of course it only works when there is a power up overlapping the slot.
First I did this:
It works fine and I can call the corresponding power-up for each slot. But I have to duplicate each power-up (event and action) for each slot. And I'm a bit lazy, so I thought that I could reduce my code to just one function that will call the correct power-up for each slot. So I will only need to edit this for futures power-ups.
So I did this:
So it choose the correct power-up in the function but unfortunately, it only choose the power-up overlapping the slot_1. It doesn't consider the slot ID number. I tried many different possibilities but it still doesn't work.
So if anyone has a solution about this, it will really be helpful!!
Thanks!