Hi,
How can I do that after clicking any cube it will highlight and the adjacent cubes, but if I click another one and there was one highlighted before, then deactivate it, on the example of a computer keyboard, if I press 5, I would like to highlight: 8,6,2,4 and 5 if later I press 7, highlight 7 but turn off 8 and 4, blue print is the default puzzle template with unreal engine
Hmm…these are always fun.
If I was going to do this, I would make each cube an actor that does line traces in the 4 possible directions that there could be other cubes. Then, when clicked, use the line traces to get the adjacent actors and toggle on/off if it successfully hit another cube. That seems like it would work.
Hmm…these are always fun.
I’m a sucker for these myself. As per Detach789’s method; adding puzzle pieces:
A puzzle piece is just a static mesh:
I think it’s working as intended.
It’s not yet, or somewhere in my blueprints an error has crept, based on the keyboard from the computer, if I press 4, they light up like I wanted all the numbers around, 4 5 7 1, but if I press 7 then only 8 and 4 light up 7 no longer and I have that with every corner and center
Perhaps you could show us the script?
If you’re using the script I posted and want to highlight the piece you’ve interacted with as well as the surrounding pieces, call the Flip for this particular block as well then.
You have too many elements in the array, you need only 4, not 5 since we’re shooting rays in 4 directions only. And if you want to include the block you’re interacting with:
Which would produce:
now it works perfectly as I wanted, Thank you for your help and patience
Wow! I always admire your dedication to helping people on this forum.
It’s one thing to just browse and type, but you actually go into the engine and construct the entire thing with screenshots for people.
Ha, the countless things I’ve learnt to do… and the things I’ve learnt not to do! Totally worth it.