How do i make enemies that attack when a player comes into the sensor

The Exact Scripts For This Is * Trigger:[When a unit enters another units sensor]
Action: if unit type of (owner of (last triggering sensor)) == (Unit)
Then Do:
Command (owner of (last triggering sensor)) to attack (last triggering unit) *
If You Want Specific Units To Be Attacked Then Put This

  • Trigger:[When a unit enters another units sensor]
    Action: if unit type of (owner of (last triggering sensor)) == (Unit) OR if unit type of (last triggering unit) == (Unit 2)
    Then Do:
    Command (owner of (last triggering sensor)) to attack (last triggering unit) *
    If You Want More Then 1 Unit To Attack You Can Either Copy And Paste Those Scripts Or Just Put * Trigger:[When a unit enters another units sensor]
    Action: if unit type of (owner of (last triggering sensor)) == (Unit) Or if unit type of (owner of (last triggering sensor)) == (Unit 2)
    Then Do:
    Command (owner of (last triggering sensor)) to attack (last triggering unit) *
    If You Want Both Of Them To Attack A Specific Unit Then Do * Trigger:[When a unit enters another units sensor]
    Action: if unit type of (owner of (last triggering sensor)) == (Unit) Or if unit type of (owner of (owner of (last triggering sensor)) == (Unit 2) AND if unit type of (triggering unit) == (Unit 3)
    Then Do:
    Command (owner of (last triggering sensor)) to attack (last triggering unit) *

And Thats About All You Need To Know

2 Likes

why You so pro man Im gonna begin making my new game so ima be really busy, got work work= noobie school boomer work

1 Like

lol i had school today too it just ended

1 Like

same haha wow school is tiring

1 Like

indeed it is tbh ik their basically giving me more scripting hours but frikin heck man my grades r dropping from zoom i honestly can wait until may

1 Like