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

Make unit that patrol can attack enemy

Status
Not open for further replies.
Level 3
Joined
Feb 11, 2013
Messages
28
Hello everyone, i have created a trigger that order a unit owned by neutral Hostile to patrol to a point. The problem is the unit did not attack the enemy around.

My Trigger:
  • Events
  • Unit - Unit come within range of 100 of dummy 096 gen
  • Conditions
  • ........
  • Action
  • Unit - Order triggering unit patrol to position of dummy 087 gen
When the unit is attacked , the unit is like going around :vw_unimpressed:=.= and did not attack.
View attachment 122962
 

Attachments

  • Untitled.png
    Untitled.png
    581.6 KB · Views: 275
Level 3
Joined
Feb 11, 2013
Messages
28
  • Patrol
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Point = Somewhere/CenterOfRegion
      • Unit - Order MyUnit to Patrol To Point
      • Custom script: call RemoveLocation(udg_Point)

Still the same problem.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
I'd go for making 2 triggers with the -attack- command targeting the ground.
This way you have to make him move back too, but I'm pretty sure it works the way you want.
I never used patrol command... its a bit funky.
 
Level 13
Joined
Mar 29, 2012
Messages
530
I think it's can't if just 2 triggers, perhaps it needs 4 triggers if it will creates region. The second trigger is to check if the unit is entering the target ground, the third trigger is to check if the unit is entering the first unit position and the fourth trigger is to check if the unit is ordered to stop, so the created region can be destroyed, also the first unit position.

And honestly i can't help.... :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I recall encountering this before. I think it was to stop Neutral Hostile units killing player's bases in melee. If you use a real player instead of neutral hostile the problem should stop. I also think there is a gameplay constant you can change to fix it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Neutral Hostile have special behaviour towards buildings. This is to stop a player using them in melee as reinforcements by luring nearby camps to a base and having them kill it for them. With nightelf buildings (ones which attack back) it would cause them to never return to their camp and thus give the luring player a huge advantage in attacking a base (the defender has to deal with the other player on one side and the creeps on the other).
 
Status
Not open for further replies.
Top