• 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.

Sending Units to your enemy when you kill an enemy

Status
Not open for further replies.
Level 4
Joined
Jan 29, 2009
Messages
79
im making a special map

its about RabbitsVsheeps and line tower wars xD

i need some help please...

i need to make a trigger which when someone kills a unit will send 2 units to next enemy player like LTW which sends units to your closer near enemy ...but when your next player aint playing then it sends them to another player..i want this..

i tried to make something but didnt work

PLEASE!!!! help and ill give you credit when my map will release xD
 
Level 25
Joined
May 11, 2007
Messages
4,650
This is the leaking way:

Event: A unit dies
Condition: if owner of killing unit equal to player 1
actions:
Unit - Create unittype of dying unit at region
unit - issue last created unit to move to region.
 
Level 9
Joined
Jun 7, 2008
Messages
440
You would run into trouble with the
  • Actions
    • Unit - order (last created unit) to move to region
If there was another unit created simultaneously in another area, some units wont even move.

Edit: Oh haha. Leaky, gotcha.

  • Events
    • Unit - a unit dies
  • Conditions
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions) {If this is somewhat similar to LTW}
    • If - Conditions
      • ((Region1) contains (Dying unit)) Equal to True
    • Then - Actions
      • Unit - Create 2 unittype for (Owner of (Killing unit)) at (Center of (Region2)) facing Default building facing degrees
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Region2) contains (Dying unit)) Equal to True
        • Then - Actions
          • Unit - Create 2 unittype for (Owner of (Killing unit)) at (Center of (region3)) facing Default building facing degrees
        • Else - Actions
And Then you would need a trigger(s) to move all units to the respective endpoints.

  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units in (region1)) and do (Unit - Order (Picked unit) to Move To (Center of (region1 End)))
    • Unit Group - Pick every unit in (Units in (region2)) and do (Unit - Order (Picked unit) to Move To (Center of (region2 End)))
    • // So on and so forth for however many players you have.
This may be a beginners way of doing it. But it works for me :p
 
Status
Not open for further replies.
Top