• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Unit return distance problem

Status
Not open for further replies.
Level 2
Joined
Jul 10, 2019
Messages
9
I made a trigger where a specific creep unit goes to attack a base, but as the title says, it pulls back after attacking for a few seconds, or the base is too far away for it to even reach it. Is there a way to prevent this without affecting the gameplay constants or keeping the player as neutral hostile?

Edit: I've tested it out and seems like a periodic time event does the job best. But it seems a bit.. questionable. They are triggered to randomly attack a player, and due to the periodic time event they dilly-dally until they finally arrive to said base, so the more time the periodic event has the more unit goes to a specific location, but this means they are more likely to retreat due to the nature of return distance, which means they will target another player and the cycle repeats.
 
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
Neutral Hostiles are hardcoded to flee when attacked by player buildings (ie. towers).
AFAIK there is no 'clean' way to overide this, though as you discovered, a periodic trigger can be used to keep forcing them back into combat.
It's also worth considering to use a player slot for the neutral enemy.
With 24 player slots, that seems like a viable option, and it fixes a bunch of other issues automatically.
 
Status
Not open for further replies.
Top