I have multiple enemies of the same object how do i make them face me even if i stand in the middle?
for example my player is in the middle and there are 5 enemys on each side
if i stand in the middle they all flip to 1 side and i dont know how to fix that
The condition “player distance to clone” doesn’t specify on which side the object is on relative to the player, it only checks the distance. You’ll need to add a condition to check the X position of the object if it’s > or < than the player. Also why are you using the raycast condition? I don’t see a use for it.
The event would be like this:
Repeat for each Clone
Player distance to Clone is below Player.Stealth
[Sub events]
– X pos of Clone > Player.X() → Simulate Left & Flip
– X pos of Clone < Player.X() → Simulate Right & No Flip
Also, the first 2 flip events should be after the repeat event and not before it.
It looks like it should be working just based on these events. Are there any other events that could be affecting their movement? When you say it doesn’t work, do you mean that they all go in the same direction as before?
Weird, they should go in different directions… actually, it looks like you have the left and right mixed up. If you want them to chase the player then they should go RIGHT when their X position is less than player and LEFT when their X position is greater.
I don’t see anything in your second screenshot that would affect their movement either. Can you show a video of it happening? Or even upload the project file so we could look through it?
You have couple mistakes in the last screenshot you shared.
in the first event, you’re checking for a link between clone_2 and clone2_gun in the sub-event, but there would be no link since clone_2 has just been created.
in the 3rd event, I see you want to create a gun for each clone_2, but you can’t use “trigger once” inside a for each event.
Instead what you want to do is create the gun and link it to clone_2 in the 1st event (same as the health bar)
Remove the last event (for each) and put the last event (gun is linked to clone → change position of the gun) in the other for each clone_2 event that you used to flip the objects. It’s better to use the same for each event if possible.