I’m relatively new to using UE4 and I’m trying to recreate a puzzle game I started making years ago on an old, outdated program. I have, after much trial and error, managed to get most of my core ideas down and sorted, what I am struggling with, however, is arrays.
What I have here, is when the player passes over the striped blocks, they explode. What I need is a way to check to see if all the blocks have been destroyed before allowing the player to move to the next level (and change a red light to green). As I understand it, the best way to do this is with an array, but after reading lots of articles and tutorial videos, I STILL have no idea how to do it. Can anyone offer any advice?
Walking atop the boxes, as I need to happen, the “On Component Hit” doesn’t do anything. I tried it with “On Component Overlap” but its very laggy and only seems to affect every other box, not destroying around half of the objects.
I also can’t figure out what that “SET” node, or the “–” node are… I can’t find them.
Walking atop the boxes, as I need to
happen, the “On Component Hit” doesn’t
do anything.
I was under the impression you already had destroying mechanics in play since the stripped boxes were exploding - I’m not suggesting a new method; use what you’ve got. I was merely suggesting a way to count.
The Set node is just a Set node - it’s an integer variable, it keeps the track of the number of boxes left. You can get / set variables:
Were I to suggest an interaction method for destroying actors we stepped on, I’d probably opt for attaching a smallish sphere collision to where player’s feet are and use on END Overlap:
I had already had destroying mechanics, but I had to modify them to incorporate your incredibly helpful guidance, and after a little bit of fiddling about, I’ve gotten it to work, thank you so much for your help, it really is greatly appreciated.