I made a creature that explodes when it comes near the character, like the creepers in minecraft, I wonder how do I make the game end when this creature explodes next to the character
Hey @tunacurumez! Welcome to the forums!
So to start, you need to code a game over state. Have you done that?
If so, you can activate it by calling it from the “creep”.
To make sure your player is within range, you need to just use “Get Distance To” and use a “<” operator to check the distance, and then a branch to block or allow it based on context. You’ll do this when the creep explodes.
And if you need to know how to get your two yellow vectors for “Get Distance To”, you’ll use:
“Get Player Pawn” → “GetActorLocation” for the first,
and another “Get Actor Location” with “Self” as the target for the second one!