So I have a bit of a problem: see I’m making this brick breaker, and I have most of these mechanics done, but now I have the problem of the results screen after breaking all the bricks: it just won’t work. In the above, you see the Bricks. Below, you see the code that I’m trying to use. The idea is that the game will count all the bricks currently present in-game, and once that number reaches 0, the results screen will show up. Not shown here is an input I specifically made that would annihilate all the bricks and make it show up. I even tried the same thing with making the results screen show up. Neither one worked. I humbly request your help in this matter. If you can give me a few pointers, I’d very much appreciate it.
Are you calling VictoryScreen every time you destroy a brick?
Ah. I see. Well, I deleted all but one brick to test it, and the game called the event once that amount reached 0…but it still won’t do it for some odd reason. Here’s the new code I put in:
I know I have to change something to make it work, but WHAT I have to change is still unknown to me. BTW, I thought to separate the code.
That’s what I’ve been aiming for, so I tried using the LENGTH node to count them all, but for some reason, it won’t count them all. I even hooked it up to a PrintScreen node to display how much there are, but I see no numbers.
Also, for reference, all bricks in-game have the Bricc tag in the Actors section, so…
Nope. All I’m doing, at least what I’m attempting to do, is making a condition that when all Bricks with the same tag reach 0, then the Results Screen Widget gets created.
Yes, but you have to actually call the custom event, of course…
Right so you have it set to display victory when there a no bricks.
When is count bricks called?
Right now, it’s called on EventBeginPlay, but right now, I’m thinking it could work with EventTick…
EDIT: Well, what do you know? That did it! Thanks for the help!