Activating a variable when pressing button B!

Hi!

I have a little problem with the game code (photo).


Generally, the point is that when I press B (input mask), the only thing that happens is as if the mask was turned off, and when I don’t press anything, it’s the same. I checked the branch but it works because when I set FoxON to Set in Event BeginPlay, it works. Please help me get this program working.
Full Code:
Please Help!

1 Like

I don’t actually quite understand what you’re trying to do, but you want to take all of this off tick.

Tick runs EVERY frame. That’s, by default, 120 times per second.

If you put delays on tick, they basically have no effect. Take a look at this. If I have

Tick → Something

That will result in

Something
Something
Something
… ( 120 per second )

If I do this

Tick → Delay → Something

What I get from that is

Delay → Something
Delay → Something
Delay → Something
… ( 120 per second )

But that’s the same as

Delay
Something
Something
Something
… ( 120 per second ).

So. Tick with delay, doesn’t do anything.

I think you might want to do something like this


The point is you delay, and then go back to the start, when it’s time. Not on tick.

1 Like

That’s not what I actually meant.
It will be easier if I send part of the project and write what effect I want to achieve.
GitHub - grawik-grawik6543/Test-Map
There is a player and Foxy on the World01 map. There is a mask in the content browser that is activated by pressing the B button. The idea is that when the project starts, Foxy should not be there, but after a random time (3 to 6 seconds) Foxy will appear and start animating Heywire . It does this for 3 seconds and when the mask is turned on, Foxy runs away and does not show animations, and if he has no mask, he shows Jumpscare animations.
I hope I explained everything.

Ok, this is what I have

In the level BP

The only code in Foxy

foxy

PS: Delete Foxy from the level before running this :wink:

1 Like

Can you send me this project as I have some problems. I forgot to write that it should work the same as in my previous version of the game (video.webm - no mask, video1.webp - with mask). Thanks you
GitHub - grawik-grawik6543/Test-Map - I added a video

I also forgot to ask how to create a global variable or something like that.
Edit: I already know about variables