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

[Trigger] Newby question on creep spawning/movement

Status
Not open for further replies.
Level 3
Joined
Oct 15, 2007
Messages
43
I was wondering if anyone could point me to finding triggers for unit move attack spawn thing? I wasn't too sure if the tutorials had it and couldn't think how to search for it.

Basically the normal or "creep" units in an aos/dota.
 
Level 5
Joined
May 21, 2006
Messages
174
What you're looking for is:
  • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Loop - Actions
      • Unit - Order (Picked unit) to Attack-Move To (Center of (Playable map area))
But remember to cover up those leaks!
 
Level 2
Joined
May 24, 2008
Messages
21
In the example he gave you, "playable map area" was the region being used to gather units. Instead of a region you can use "units owned by player" or "units matching conditions" etc. Create a new action and in the unit group drop down you can see all the options.

Another method would be to add all the units you are creating to a unit group variable, then issue an order to every unit in that unit group. You can use a unit group array to hold the units if you need to handle things individually for multiple players.
 
Level 3
Joined
Oct 15, 2007
Messages
43
Hmm in my instance I have several "areas" in which units march through, then units are moved up the next row (or down if the other side) then continue to march. I knew he meant the region, but currently to activate the march I have in use "unit enters region" since I could not figure what could be more suitable.

Each "area" is a lane so movement is somewhat handled simply, though I feel that I might have to make an object variable for each lane and for both creep runners? (Side 1 and 2 spawns)

That is the gist of it, at least a better explanation.
 
Level 2
Joined
May 24, 2008
Messages
21
Hmm, not sure what you are in need of at this point then. When your units spawn do you order them to move just past your first "unit enters region" re-control region or do you command them to the end point of the applicable lane?

If you need this to happen for a specific amount of units or a specific player's units you can qualify the unit group selection further and use "units owned by player of type" or "units in region matching", whereby you set match conditions of player owner etc.

It sounds like you are figuring things out a bit on your own so good job.
 
Level 3
Joined
Oct 15, 2007
Messages
43
Not like I want to do complex things, but I'm probably hitting that (It's bugging enough I want to do custom skills right now >.<) but here is what I'm thinking.

If I can figure out which condition or event would allow "unit of specific player unit enters region does action" would very simplify everything.

Though not the case, I may have to store the group of recently created units and move them, then delete variable for the next group. Delete part to remove "leaks" or whatever, though not my main concern at the moment.

Then when units are instantly moved to the next level, wrap them up in a new variable and repeat. The problem here is not not catch player units into the creep movements of the computer players.
 
Level 2
Joined
May 24, 2008
Messages
21
Something like this?

  • Events
    • Unit - A unit enters Region 000 <gen>
  • Conditions
    • (Owner of (Entering unit)) Equal to Player 1 (Red)
  • Actions
    • Unit - Order (Entering unit) to Move To (Center of (Playable map area))
Or this?

  • Events
    • Unit - A unit enters Region 000 <gen>
  • Conditions
    • ((Owner of (Entering unit)) is in (All players controlled by a User player)) Equal to True
  • Actions
    • Unit - Order (Entering unit) to Move To (Center of (Playable map area))
 
Level 3
Joined
Oct 15, 2007
Messages
43
You sir rock!

Thanks alot, this solves the relatively small problem that was banging the back of my head.
 
Level 2
Joined
May 24, 2008
Messages
21
Glad I could help. I am pretty decent with GUI triggers but I still have so much to learn. I look at many of my triggers from 2003/2004 era and I have since found so many superior ways of handling the same challenges. You will likely find yourself in this sort of success if you continue to work in the editor, good luck.
 
Status
Not open for further replies.
Top