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

[Trigger] Moving units

Status
Not open for further replies.
Level 3
Joined
Feb 16, 2008
Messages
40
i need help on spawning some units then order them to move/attack to a point in the map. ex: dota? i think? never played it but i think there's something like that in there. i have the spawning units part i just need to find out how to automatically make them move to a certain point across the map. i'll +rep :thumbs_up:
 
Level 14
Joined
Oct 27, 2007
Messages
1,395
it's really not all that hard,
you need to make regions/units for the spawning units to attack move to
i'd show you but I don't know how to make triggers in posts :(
Say:
Event:
Unit - A unit enters Spawn_Region

Condition:
(Owner of (Triggering Unit)) equal to Player

Actions:
Unit - Order (Triggering Unit) to Attack Region/Unit

not hard once you figure it out :)
 
  • Trigger One: Spawning;
  • Trigger:
  • Spawning
  • Events
  • Time - Every 12.50 seconds of game time
  • Conditions
  • Actions
  • Set Point = (Center of Region)
  • Set Point2 = (Center of Region2)
  • For each (Integer A) from 1 to 5, do (Actions)
  • Loop - Actions
  • Unit - Create 1 Footman for Player 6 (Orange) at Point facing Default building facing degrees
  • Unit - Order (Last created unit) to Attack-Move To Point2
  • Custom script: call RemoveLocation(udg_Point)
  • Custom script: call RemoveLocation(udg_Point2)
  • Trigger Two: Move2;
  • Trigger:
  • Attack Move Two
  • Events
  • Unit - A unit enters Region2
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to Footman
  • Actions
  • Set Point = (Center of Region3)
  • Unit - Order (Triggering unit) to Attack-Move To Point
  • Custom script: call RemoveLocation(udg_Point)
  • Trigger Three: Move Three;
  • Trigger:
  • Attack Move Three
  • Events
  • Unit - A unit enters Region3
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to Footman
  • Actions
  • Set Point = (Center of Region4)
  • Unit - Order (Triggering unit) to Attack-Move To Point
  • Custom script: call RemoveLocation(udg_Point)
But there is no need to set region as variabl, and than destroy it, i think that regions dont leak
(btw this is not my trigger, i have saved in my PC and than i just copy it here, because there are people asking about that, like each 5 seconds...)
 
Status
Not open for further replies.
Top