• 🏆 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!

Neutral Guard Distance

Status
Not open for further replies.
Level 6
Joined
May 13, 2005
Messages
164
I have got Neutral Hostile creep camps all around the map and also have a quest which the Heroes have to slay a Neutral Boss which will be moving around the map randomly. The problem I am facing now is that the Neutral Boss always returns to his original position after walking a short distance when ordered to attack-move to a random point. I've tried to solve it by changing the player which owns the Boss to Neutral Extra from Neutral Hostile, thinking that the creep guard distance in the gameplay constants works only for Neutral Hostile units, but the problem is still there. Also, I cannot change the creep guard distance because I have got other Neutral Hostile creeps which need it. Any suggestions?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Well, it's known that Neutral units can have some problems with executing trigger commands. Why don't you temporarily add the boss to a player and test it. If it works, you'll have to clear a player slot or share a computer slot.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
If he still shows the same problem as before, then I'll have to check my WE to see if I can find any options there. That'll be later today, since I got no access to the WE at the moment.

EDIT: Sorry, I don't think I can find the solution then.
 
Last edited:
Level 5
Joined
Aug 24, 2008
Messages
199
maybe you have added the boss to a specific camp, you can check this in your editor the unit will be tinted blue. Double click the boss and set normal instead of camp. If you leave it to camp he will always return to the camp he is attached to.
 
Level 5
Joined
Aug 24, 2008
Messages
199
Good question i need to figure out how to change that camp via triggers.

I thing however that a spawned is added to the camp if it spawn within an radius of 100 around any unit of the camp.
Dose that boss spawn in a camp ? If so try changing his spawn point.

A simple way would be to pre place him in an unused area and simply move him when he should spawn. Just make sure he doesn't look blue in your world editor

The Gameplay constants contains also some stuff that might fix your problem check the creep point.

If the units are Preplaced you can simple mark the unit you want to be in a camp go into the unit properties by pressing enter and then switch between camp and normal.

However maybe this work around can help you
  • Event
    • Every 1 second game time
  • Condition
    • BossSpawned equal to true
  • Action
    • Issue Order (boss) to attack move to (region variable)
BossSpawned is a Variable that is set to true once the boss spawns to order him you need to local him (I hope this is the right term for assigning a variable to it) Also the Region should be stored into a variable to change it easily.
This is not a clean the boss will sometimes simply run into his camp direction however once the trigger executed he will return to his previous actions (attacking or moving)
 
Level 6
Joined
May 13, 2005
Messages
164
Why did you guys mention the Boss looking blue? He dont look blue in my editor in anyway if i did preplace him or not. And he's currently under Neutral Extra Player. Thx for trying to help, but the trigger is not very good and my Boss has channeling spells, meaning that ordering him to move every second will cancel his spell. I think i have to look into how Icefrog made DotA able for 6v6 including Neutral Hostiles in one of the versions.
 
Level 4
Joined
Jul 19, 2005
Messages
90
Well, if you want your neutral boss to be constantly moving around the map you can just give it the "Wander (Tornado)" ability. If the movement is too much you can just use regular Wander. I think the boss should stop wandering during combat, so it won't matter that it has channeling spells.
 
Level 6
Joined
May 13, 2005
Messages
164
Sorry i forgot to say that my map is an AoS-style map, like DotA. By giving him the Wander ability, he will walk onto lanes undesirably. I have already made specified regions where he will walk to periodically and randomly, so I am using triggers to make him walk between those regions.
 
Level 4
Joined
Jul 19, 2005
Messages
90
I think I understand you. If you mean you want your Boss to randomly move between several specificied points/regions every time interval, then use the following trigger:

Variables you will need: BossRegionNumber (a Real)

Event:

Every X seconds

Conditions:

Boss is alive.

Actions:

Set "BossRegionNumber" to (Random number between 1 and Y [Where Y is the amount of regions you want the Boss to move between]).

(If/Then/Else)

If 'BossRegionNumber" is equal to (random number) then order (Boss) to attack move to (Region that corresponds to number), else do (same trigger, but with different values).

_________

That should work, obviously for brevity I haven't written it in correct triggers, but that's the gist of it. If you don't want leaks then I think you have to make variables for the regions you want. Also, I'm not sure if when you do random number between A - B, A is included.

I haven't been on the Hive lately so I haven't tried to figure out how trigger tags work.

EDIT: Been re-reading the thread, realised what you meant. You can just do what I said in this post, but lock the Boss in place when it enters one of your specific regions.

EDIT 2: Just checked WE. You CAN change an INDIVIDUAL unit's guard distance. It doesn't work on Heroes or Peons though. All you have to do is make a trigger changing the guard distance of the Boss.
 
Level 5
Joined
Aug 24, 2008
Messages
199
yeah the trigger is bad i agree with that.

Have you tried to preplace him? You can then move him via Trigger Instant move to the position he should be. If you set units to a camp they turn blue thats what i meant. I still thing this is your problem that the boss is added to a camp as it explains his behavior perfectly.
 
Level 6
Joined
May 13, 2005
Messages
164
salamander: How do you change an individual unit's guard distance? I already searched all the trigger actions for it.

Zinive: I made the Boss spawn at a location. Then, due to the trigger "Every 22 seconds, order Boss to move to (Certain) Region", the Boss walks from his original position towards that specified region, but after walking a short distance, he turns back and returns to the location where he spawned and stops there until the trigger that orders him to move again starts.

Btw, thx for trying to help. +Rep to both.
 
Level 4
Joined
Jul 19, 2005
Messages
90
I made a mistake sorry. I've been trying to get it to work, but the hostile enemy always returned to it's original location.
 
Level 12
Joined
Mar 16, 2006
Messages
992
Just max out the GUARD - RETURN DISTANCE stat.

Make a trigger that records the starting location of creeps.
If a creep is attacked, check the current distance from their starting location.
If they're too far away, teleport them back to their location.

Unless they're the wandering boss.
 
Level 6
Joined
May 13, 2005
Messages
164
Vegavak: Good Idea!! I can order the Neutral Creeps to return to their spawn area if they leave a certain region around them which they are meant to guard. Like that, the boss can also move as far as he want without returning =) But I haven't tried it yet, and still looking for better solutions, thx for that great idea.
 
Level 12
Joined
Mar 16, 2006
Messages
992
Vegavak: Good Idea!! I can order the Neutral Creeps to return to their spawn area if they leave a certain region around them which they are meant to guard. Like that, the boss can also move as far as he want without returning =) But I haven't tried it yet, and still looking for better solutions, thx for that great idea.

Unfortunately, that is the only solution. To get exactly what you want, you're gonna have to take the extra steps. Or you can skimp out on it and X out player brown for the easier road.
 
Status
Not open for further replies.
Top