Boolean variable isn't reflecting through interface?

Hi folks,

I’m trying to implement a double jump powerup in my 2D platformer game, yet something seems to keep going wrong.

Here’s the design.

First, I built an interface in order to communicate between the character blueprint and the powerup one.
As u could see, there’s a boolean variable judging if it’s available for ur character to doublejump.

For the powerup, I made a PaperSpriteActor to contain the texture of icon and set the boolean to true for 10 secs after overlaying with pawn

Finally, this is how I supposed should be like in the character blueprint. I left a printString to check if the bool var changed after acquiring the powerup but it turned out to failed.

No matter I ate the powerup or not, the character could always only jump once and ‘false’ is keep printed on screen when I do so.

However, the msg ‘DoubleJump powerup acquired’ and ‘…deactivated’ is displayed normally, so I guessed the script in the powerup BP is working…

what’s exactly the problem? I’m really getting confused. :frowning:

On the CharHandler, get that event coming from the interface “DoubleJump” out of there and create a variable to store the this (E.G. IsDoubleJumpEnabled), make the event set this variable and use this to check if double jump is enabled or not, also make sure to set this back to false once the timer ends. It seems to me that when you press the jump button it will try to access the “candoublejump” variable from the interface and this will return the default value (false) every time, you need to save that when the event happens.

I’m not really sure if I’m with u but I tried to do as what u said… (and done some revision for a logical error)

but still, eating the powerup or not doesn’t change anything

PS. Just for ur reference. The default value of HopLimit is 2 and HopCounter is 0

anyone got any idea…? plz?