• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to make multiple units to spawn from point and move to another point?

Status
Not open for further replies.

Puuppamies

P

Puuppamies

It's been a while since I have made any kinds of triggers and now I have forgotten al of the basics. Could any one please tell me how to make some units to spawn and then to move to another location?
Like:
  • Sheeps
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Sheepspawn[1] = ((Center of Region 000 <gen>) offset by (500.00, 0.00))
      • Unit - Create 1 Sheep for Neutral Passive at Sheepspawn[1] facing 270.00 degrees
      • Custom script: call RemoveLocation (udg_Sheepspawn[1])
      • Set Smoveint[Smoveint2] = Smoveint[(Smoveint2 + 1)]
      • Set Sheep[Smoveint[Smoveint2]] = (Last created unit)
      • Set Sheepposition[Smoveint[Smoveint2]] = (Position of Sheep[Smoveint[Smoveint2]])
      • Set Sheepmove[Smoveint[Smoveint2]] = (Sheepposition[Smoveint[Smoveint2]] offset by 20.00 towards -90.00 degrees)
      • Unit - Move Sheep[Smoveint[Smoveint2]] instantly to Sheepmove[Smoveint[Smoveint2]]
I know, this version doesn't work at all but the idea of this thing is that sheep (or anything else) spawns from point and then moves to another location with instant move to position which is close to unit and then creates some kind of wave of sheeps. Please help me!
 
It still doesnt work :C
 
Last edited by a moderator:
well I try tochange it to 270 then... I was a little bit lazy
Nope. It still doesnt work. sheeps get spawned but they are not moving.
trigger looks like this atm
  • Sheeps
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Sheepspawn[1] = ((Center of Region 000 <gen>) offset by (500.00, 0.00))
      • Set Smoveint[Smoveint2] = Smoveint[(Smoveint2 + 1)]
      • Unit - Create 1 Sheep for Neutral Passive at Sheepspawn[1] facing 270.00 degrees
      • Set Sheep[Smoveint[Smoveint2]] = (Last created unit)
      • Set Sheepposition[Smoveint[Smoveint2]] = (Position of Sheep[Smoveint[Smoveint2]])
      • Set Sheepmove[Smoveint[Smoveint2]] = (Sheepposition[Smoveint[Smoveint2]] offset by 20.00 towards 270.00 degrees)
      • Unit - Move Sheep[Smoveint[Smoveint2]] instantly to Sheepmove[Smoveint[Smoveint2]]
 
Last edited by a moderator:
well I try tochange it to 270 then... I was a little bit lazy
Nope. It still doesnt work. sheeps get spawned but they are not moving.
trigger looks like this atm
  • Sheeps
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Sheepspawn[1] = ((Center of Region 000 <gen>) offset by (500.00, 0.00))
      • Set Smoveint[Smoveint2] = Smoveint[(Smoveint2 + 1)]
      • Unit - Create 1 Sheep for Neutral Passive at Sheepspawn[1] facing 270.00 degrees
      • Set Sheep[Smoveint[Smoveint2]] = (Last created unit)
      • Set Sheepposition[Smoveint[Smoveint2]] = (Position of Sheep[Smoveint[Smoveint2]])
      • Set Sheepmove[Smoveint[Smoveint2]] = (Sheepposition[Smoveint[Smoveint2]] offset by 20.00 towards 270.00 degrees)
      • Unit - Move Sheep[Smoveint[Smoveint2]] instantly to Sheepmove[Smoveint[Smoveint2]]

POST the map. and i'll try to fix it.
 
Status
Not open for further replies.
Back
Top