Im having serious trouble

@XXD3G Did you get it figured out?

@johnpost unfortunately no.

@JR01 would u happen to know how to do this?

@johnpost would it work if i used a logic gate?

You can definitely try doing that, if you do it right I could see it working. If you don’t get it, I can help you more in-depth later today.

@johnpost thanks, and how would i use the logic gate, tbh i have no idea how to use a logic gate

I think I would try using a save behavior called something like “item1”.
This would be the player’s item box, and you can only save 1 item to it.

For example, it “item1” saves the number:
0 = nothing
1 = coin
2 = banana
3 = shell
etc…

And like “item2” would be CPU, etc., etc.

could you give a screenshot? @JR01

A logic gate just checks if the 2 inputs match a set combination. So for example, an AND gate only turns on if input 1 and input two are active. An OR gate turns on if input 1 or input 2 is active. There are other ones as well, they are listed in the flowlab documentation.

thanks for explaining it but, i dont rly know what exactly i need to put in the logic gate. @johnpost

I take back what I said, you probably won’t need a logic gate, but you can use one if you think you need it. Here is a screenshot of what I would do. The input that goes into the switch is which powerup you get when you hit a box. The the input gets sent to the global variable called Powerup_Player1. It is always sending its value to the filters. If the variable equals 0, that means you have no powerups and the switch turns ON so you are able to collect a new powerup. If the variable equals a number other than 0 (which would each correspond to a different powerup), then the switch turns OFF so you can’t pick up a new powerup. The outputs from the filters with numbers above 0 would go to the code for each powerup. When you use a powerup, you should turn the variable back to 0 so you can get a new one.

i would put that in the item box right? @johnpost

Wherever your code to select powerups currently is

You would hook it up to the code that currently selects powerups

what goes into the random? @johnpost

I think this would come after the random. Once the random picks a number, put the number into the “IN” of the switch on my new code

@johnpost now th player can infinitely use an item

You will have to set the global variable back to 0 once each powerup is done being used.

how do i do that? @johnpost ? and sry if im bothering you too much.

It’s not a problem. Let me look a sec