I have a co-op game and I want the enemy to chase after the closest player. I’m using proximity but idk where to go from there
@CodeAlpaca Help!
I have a co-op game and I want the enemy to chase after the closest player. I’m using proximity but idk where to go from there
@CodeAlpaca Help!
In proximity, there is an option to output the closest object found. Have the players connected to a parent object and search for that parent object. If you’re searching for the lowest number that’s something different
Could you send me a picture?
Sorry I guess the title is a little misleading
The globals are called “Enemy”, why is that the player? Also move the “Animation” behavior lower so the wires from the Proximity don’t travel as far
Because its FOR the enemy
Still makin that picture?
You said the globals are for the player
In the second picture, you would select the same Parent object to be the same for both players. Remember, parent objects share their code with the child objects.
Will the parent object mess with any of the code?
As long as there is no code in the parent object that messes with it, it will work.
Thanks! A’lot
TYPO DETECTED!??!
I saw that and considered adding the comma, but figured it was fine
Now the XY will output the closest player. Use those X, Y for whatever movement you make for chasing the players
I know but the way the enemy chases the players is by those globals
How is it going to turn the right one on
What object is this code in? (Player, Monster, or something else?)
Zombie