Where is my thinking mistake?

AMyCharacter* AMyCharacter::GibtGegner(AMyCharacter* Char)
{
     return Char;
}

This doesn’t make any sense. The function asks for a character, and it returns the same character that you gave it. So it does nothing basically. This is what I’d do. (Also I’m not sure if AMyCharacter is supposed to be the enemy, or the player class.)

// .h

// The latest enemy character from the overlap check.
UPROPERTY() // <-- Use this every time you are storing pointers in headers. Otherwise the garbage collector will delete it from memory.
AMyCharacter* EnemyCharacter;

// Returns the cached enemy character pointer. Can be null!
AMyCharacter* GetEnemyCharacter();
// .cpp

void AMyCharacter::BeginBoxOverlap(...)
{
     AMyCharacter* Enemy = Cast<AMyCharacter>(OtherActor);
     if (Enemy )
     {
          // Cache the enemy character.
          EnemyCharacter = Enemy;
     }
}

AMyCharacter* GetEnemyCharacter()
{
     // Return the character that is set in EnemyCharacter var.
     // Returns null if the variable is not set.
     return EnemyCharacter;
}
1 Like