How to detect when a character has collided with a wall

Hello Nicholas,

My wall sprites aren’t apart of a tile map and I have checked their collisions, which seem to be in order, also I have set up their collision responses accordingly to what I want to happen.

274609-largebricksprite.jpg

I can set my breakable wall/bricks as a blueprint actor so that won’t be too much of a problem.

My main problem is coding my Shadow Fist enemy to move forward continuously until it hits either the wall or the player, I have tried doing this before with a while loop (which leads to an infinite loop/crash) and a for loop (which with an index too high causes an infinite loop/crash, and would cause my enemy to return to the wrong area).

274631-loopcrash.jpg

274632-hitcomponent.jpg

Is there a way for me to cast my wall sprite to the Hit component (Other Actor), and is there a way for me to send my enemy forward with a loop without my game crashing?

Cordially,

Nebula