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

Need help. Units dont walk to enemy.

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
Have you done any work with triggers before? These are fairly simple triggers to make yourself and might be a good way to learn the basics. It will be better in the long run to learn some stuff now rather than get the whole triggers made for you :p
 
Level 12
Joined
May 22, 2015
Messages
1,051
You made the trigger to spawn the units though, right?

Do you understand the structure of the triggers?
Events
Conditions
Actions

There's probably a beginner guide for this somewhere, so I'll see if I can find one.
 
Level 2
Joined
Jun 28, 2015
Messages
20
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Your Region <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Owner Of the units you want to spawn (???)
    • Actions
      • Unit - Order (Triggering unit) to Attack-Move To (Center of Second Region <gen>)
use something similar to this, create Two Regions. one that the units will spawn in, and one where you want them to go, set the first region to where they spawned, and the second to the other region you created. they will move to said region and attack any opponents they come across.

if you want them to turn and make more complicated movements, set up a chain of regions and order the units to attack-move to each of the regions one by one in order.

Assuming that dark green owns the units, it would look like this:

  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Unit - Order (Triggering unit) to Attack-Move To (Center of Region 001 <gen>)
Explanation (read to get a better understanding):
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
this is you telling the game "i want you to recognise that when a unit goes in this specific area, i want you to do something"

  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
this is you telling the game "but only if the unit in the area is owned dark green"
  • Actions
    • Unit - Order (Triggering unit) to Attack-Move To (Center of Region 001 <gen>)
This is Telling the game "i want a unit to move to an area"

the "triggering unit" is usually the unit that preforms the action under "events", such as; casting a spell, killing another unit or in this case entering a region.

if you want all the units to move, replace "unit - order" with "unit group - order"

hope this helps!
 
Level 2
Joined
Sep 19, 2014
Messages
11
The problem is my World Editior is in german... I also want to make income per kill or like Dota every 30 seconds 100 Gold or something. I will try it. Thank you

And I dont understand :D
 
Last edited by a moderator:
Status
Not open for further replies.
Top