• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to change Creep Aggro range?

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
I know this has been asked a lot but I cant find any of the treads any more...

Anyway, I have a Neutral Hostile creep camp.
However I want the creeps to dont attack me until I attack them.
And even make me not auto acquire them as targets.

So the easiest way should be changing the guard distance in the global constants but that did nothing at all.
I tried 0, 0.01 and 1 as values but no results.
Also the distance to return is way higher than in the global constants.

Does anyone know how to do it?

EDIT: I have no problem with triggered creep systems if that brings me a solution.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Set acqusition range of all creeps to 0.

In gameplay constants, there is a field called something like "call for help range", set it to 0.
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Why not simply letting them sleep instead of silencing? During the day, you could the spell of the Dreadlord. During the night, they do it naturally by themselves. If you really don't want the zzz and the sound during the day you can always remove them through the Object Editor.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Wow that acquisition range thing blows my mind.So we can set a unit's attack range to 999999 from object editor and we can change attack range by triggers via changing acquisition range.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Not exactly... I have tried that already :D

My final conclusion is that it is better to replace the basic attack with a custom ability (invisible ofc) that would be cast when "A unit is attacked" fires.
That ability can be set on a dynamic cooldown (attack speed from -80% to 400% is history) and the unit should instead be casting another ability with an enormous casting time will add him to a group of units that will periodically check if the unit is still ordered to cast that spell and if the cooldown expired.

Basic Attack 2.0
Welcome to the world where we deny Blizzard.

Anyway, to go back to the original topic, I decided to make the system myself.
However, there is one thing that bothers me.
How can I disable ALL UNITS to not auto target the creeps?
I tried setting alliance settings but that is horrible.
 
Just add the "peon" unit classification to all units you don't want to auto-attack. You can even do that dynamically via triggers; it's one of those unit types you can actually access via triggers.

Then, when you attack those units, remove the classification, so they behave like normal units again.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
That would make me have to give all units on the map that classification.
And they wouldnt auto target any other units any more.

EDIT:
I might not have been clear enough but I am looking for a way to make the player's units not attack the creeps until the creeps are in combat.

However, the peon type does indeed work smooth for the creeps themselves causing the system to not require a dummy unit, ability and buff any more.
 
Last edited:
Status
Not open for further replies.
Top