I’m not sure what you mean by this. There are no delay nodes or anything, so you can just implement this into a function with no changes. The class of new powerup should be a variable you take from the pickup you just picked up.
It doesn’t strictly signal you have two powerups of the same type.
That’s the purpose of this section:
If you already have the powerup, you level it up (ie from level 1 to 2 or 2 to 3 using the levelup function).
Let’s take the example “you pick up three speed powerups”.
Each time you pick up a speed powerup, the section in the first image will play, so let’s go through it one pickup at a time.
-
For the first pickup, we get to the branch node and realize that we don’t already have a speed powerup. Because of this, we go out false on that branch. False leads us to create/record a new powerup object.
-
For the second pickup, we get to the branch node and notice we DO already have a speed powerup. This leads to true on the branch. We want our speed powerup to be level 2 now. The true pin on the branch leads to a node that levels up our original powerup. Our speed powerup is now level 2.
-
The same thing happens with the third pickup as the second. The powerup exists, so we level it up- resulting in a powerup that’s now level 3.
Whenever you use the powerup, you simply remove it from the map, and the cycle repeats whenever you pick up another powerup.
