How do i add health to enemies, make enemies come after you, and add health

Can you also say it like ur talking to a cat(for dummies)

1 Like

I could also use this information. I just want a simple enemy that is trying to run towards a player.

Hi @PandaWafer!

You can start with something like the way below and improve this code by yourself. (This code has to be in a script that is attached to your enemy entity).

var player ="Player");
var distance = this.entity.getPosition().distance(player.getPosition());

if (distance > 1 && distance < 10) {
    // look at the player (probably your model need to be rotated 180 degrees)
    // move forward (if the rigidbody is kinematic)
1 Like