• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Get to the End and Die there!

Status
Not open for further replies.
Level 11
Joined
Nov 24, 2010
Messages
204
Well here it goes. Lets just say its a mob vs mob map. Where random units spawn and go kill each other. Usually when they spawn everything goes well.. Until they kill a unit and then they return back where they spawn :goblin_wtf: So basically.. Can someone tell me a trigger where they attack-move to that region without coming back :vw_wtf: or should I spawn 1000 regions and when they step into one it orders them to attack to that location. I'm a rookie so I hope someone can help me :).

Thanks in advance, Pyraeus.
 
Level 3
Joined
Jan 8, 2011
Messages
70
Unit - A unit enters Region 000 <gen>
Unit - Order her0 to Move To (Center of Region 001 <gen>)

her0 is just used instead of a unit. This would work if your units spawn in one region, then move to center (other region). They should stay in center and just fight then.
 
Level 7
Joined
Dec 8, 2008
Messages
243
Order the built unit to attack-move to a location, rather than a specific unit. This will stop units from stopping once they've killed a unit. (This is what Dota did)
  • unit is created
  • order last last created unit to attack-move to this location
[edit] Are you sure your telling them to attack-move, and not something else?
 
Level 12
Joined
Apr 4, 2010
Messages
862
Don't teach people leaks... BRB, writing scripts for u.

Edit:

1) You need 2 variables
1a) A point variable named "TempPoint1"
1b) A Unit group variable named "TempGroup1"
--Information--
2) Player 1(Red)'s allies and his units will move to a location.
2b) Player 6(Orange)'s allies and his units will move to a location.
2c) Take note, the location they are issued is different, this is adjustable via "TempPoint1"

  • Events
    • Time - Every 0.1 seconds of the game time
  • Conditions
  • Actions
    • Set TempGroup1 = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit is alive) Equal to True)))
    • Unit Group - Pick every unit in TempGroup1 and do (Actions)
      • Loop - Actions
        • Set TempPoint1 = (Center of (-Your Region Here-))
        • Unit - Issue (Picked unit) to Attack Move to (TempPoint1).
        • Custom script - call RemoveLocation(udg_TempPoint1)
    • Custom script - call DestroyGroup(udg_TempGroup1)
    • Set TempGroup1 = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 6 (Orange)) Equal to True) and (((Matching unit is alive) Equal to True)))
    • Unit Group - Pick every unit in TempGroup1 and do (Actions)
      • Loop - Actions
        • Set TempPoint1 = (Center of (-Your Region Here-))
        • Unit - Issue (Picked unit) to Attack Move to (TempPoint1).
        • Custom script - call RemoveLocation(udg_TempPoint1)
    • Custom script - call DestroyGroup(udg_TempGroup1)
PM/VM me if u have any queries.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Setting the units x and y via the SetUnitX and SetUnitY natives should not change their origan position (I hope, never tried). As such they will walk back to where they spawned or were last moved via the other form of unit move.

Another good way to move units is to order them to patrole, which will mean they will atleast come back if they do decide to walk to their source of origan.
 
Level 12
Joined
Apr 4, 2010
Messages
862
Setting the units x and y via the SetUnitX and SetUnitY natives should not change their origan position (I hope, never tried). As such they will walk back to where they spawned or were last moved via the other form of unit move.

Another good way to move units is to order them to patrole, which will mean they will atleast come back if they do decide to walk to their source of origan.

It didn't work, just tried it today.
 
Level 9
Joined
Jul 27, 2010
Messages
581
hmm. By mob vs. mob map. You mean they are balanced, and lined up?

If not, I'd use 2 regions, each on the opposite parts of the map. Use the action: create (number) (units) then pick every unit in region 001 and do attack-move to region 002
 
Status
Not open for further replies.
Top