How to stop creeps from getting inside town?

windahl93

New Member
Reaction score
2
Hi
I'm making an RPG and just oustide town there are some evil creeps. If my heroes HP gets too low i return to the town i've made. but the creeps follow me inside! I want them to return to thier position when i get inside town.

How is this possible?
 
Create a region, and when an unit owned by neutral hostile enters your region, order them you return back to their original spot or something.
 
Another way to do it without triggers is to set the acquisition range for the creeps and under gameplay constants creeps - guard distance or guard return time or guard return distance.
I think you would probably want to change the creep - guard return distance to the distance the creeps are at from your town
 
Trigger:
  • Melee Initialization
    • Events
      • Unit - A unit enters Base <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Neutral Hostile
    • Actions
      • Set GoHere = (Random point in Go Here <gen>)
      • Unit - Order (Entering unit) to Move To GoHere
      • Custom script: call RemoveLocation(udg_GoHere)
I think this will work:)
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top