2D Enemy wont reopen level

I have a problem.
I have a 2D enemy which is supposed to restart the level if the Player touches him. but for some reason it wont work…

Hello DasBesteBruno,

Are you sure that the Overlap event is triggering? If you’re looking to use an overlap event, be sure that the collision for your player and the enemy are set up correctly. For overlapping, they’ll need to not block each other, but overlap each other. If they’re set to block each other, you would need an OnComponentHit event instead of OnComponentBeginOverlap.

You can watch to see if it is triggering by watching the debugger while playing. Be sure to set the Debug instance to the enemy that you’re trying to overlap if so. If it is triggering, be sure the name that you’re putting into the Open Level node is correct.

Hello

I tried both, hit and overlapping but both are not working.
I dont think it is even triggering, im not able to find the debugger (probably because im new to Unreal Engine…). So i cant prove it.
I am relay sure that i put the right level into the Open Level node, since I use the same node in a trigger volume in the same level…

Thank you for your answer.

The debugger is available from the Blueprint Editor. Hit the Play button while viewing the blueprint you wish to debug and it’ll start PIE in a new editor window. Hit Shift+F1 to get your cursor to appear so you can move the PIE window out of the way. At the top right of the blueprint editor, there is a “Debug Filter” dropdown. From that list, you should be able to select any instance of that blueprint that is currently in the level. Whenever you try to overlap or hit that instance, you should see that logic happen in the blueprint if it is being triggered.

No, it does not get triggert…

Ok, lets look at the collision settings between your enemy and your character. Could you take screenshots of the collision section of your blueprints? Also, are these enemies spawned at runtime or are they already in the level before the game starts?

The enemys are already in the level. alt text

Thank you for the screenshots but they don’t show very much information. Can you please expand the “Collision Presets” section and take a screenshot of everything under “Collision” for both blueprints like so?

76072-collisionsettings.png

Sorry abou that…

This are both. The first one is the enemy the second one is the character.

Thank you for the information. This should work correctly for the Hit event although it does point out something else. I’m not sure if you’re doing the same thing for your hit event but for the OnComponentBeginOverlap above, you were using robo3 as the component to be used.

As the CapsuleComponent is the root and has the largest collision, it would be best to use that for your Overlap and Hit events. Could you try changing it to use that instead to see if the expected behavior occurs? Alternatively, you can use OnActorHit or OnActorBeginOverlap instead of specifying a component.

If you want to go back to using Overlaps, you’ll need to change the Enemy to react to the “Pawn” object type with “Overlap” instead of “Block”.

Thank you so much.The capsule was blocking, So the character wasnt able to come close enough to trigger the event. After i changed the component to capsule it worked perfectly…