Ai moves

so i need help on making that when a UNIT touches another unit that has the state as Protected it sees the last touched player mouse position and do the UNIT that has Ai enabled move to the player that is closest to the last touched unit mouse position without going to the position of the unit that was touched

2 Likes

Trigger: unit touching unit

If state of last touched unit == protected
Command unit to move to mouse x mouse y of owner of last touching unit

Ok but how i will do that it will follows the closest person after going to the mouse position of the last touched unit

Follow them like permanently or just go to where they are?

go to their direction and will only stop following the unit when the UNIT touches on the unit and that unit has state as protected and it will repeat until the UNIT touches someone that dont has state as protected them the UNIT will spawn on the center of the region “RSpawn”.

1 Like