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

Spawned units

Status
Not open for further replies.
Level 8
Joined
Jul 22, 2008
Messages
331
create regions... do not use spawn ability.
use
  • Unit - unit dies
  • Unit - Create unit at position of dying unit
  • unit - order last created unit to move to...
I think that's it...
if that's what you want...
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • (Entering Unit) equal to *spiderling*
  • Actions
    • If
      • (Region 1) contains (Entering Unit) equal to true
    • Then
      • Set temppoint = destination
      • Unit - Order (Entering Unit) to move to temppoint
      • Custom script: call RemoveLocation(udg_temppoint)
    • Else
      • same for the rest of the regions
Or use a periodic trigger which orders all units in a certain region to move to your destined point ;)
 
im sorry but if it was that easy i wouldnt be asking now would i?...


Heres an example of your triggers..


O = Regions for path.
- = path
. = no path
x = dies



O--------O
............-
............-
O--------O
-...........
-...........
O--X----O


if unit dies at X then it would move to the next O..
how ever if X was
say..


O--------O
............-
............X
O--------O
-...........
-...........
O--------O

There, then it has to move to the next O but not the last O.

and X can be anywhere...
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The hell was that?

Anyway, since it seems like you have multiple regions in each important curve, or something like that, record where each of the units are (only for that wave, for efficiency) and then order based on that.
You simply add to an integer or something like that a value whenever a unit of that type (or whatever you are "listening" to) passes one of your "check points".
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
No.

1a) Create a unit array and set all the units in the wave into it.
1b) Set each of the wave units custom value to something different from the others (with a loop).

2a) This is only for 1a. Skip to 3.
2b) Create a integer array with the default of 0.

3) If a unit enters a region, you set the integer array's slot (if you skipped from part 2a, do the same thing but with the unit's custom value) that represents that unit to its value plus one.

4) When a unit dies, you check what the value is and you order the created spawns to move to the next region.

For example, if the integer is equal to 4, you order them to move to region 5.
 
ok so..


The wave.

Integer A from 1 - 5
Create 1 unit type of X at blah.
Set custom value of unit to 1
wait 2 seconds.

other trigger.

Unit enters region x Set custom value of unit to custom value of unit +1


Another trigger.

Unit spawns a summoned unit
summoning unit type = x
custom value of summoning unit = 1

move spawned unit to region x.


Repeat for every friggen region?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
I've undesrtood it like whenever a unit enter the map, set its' custom to 1 and whenever it enters a region set the custom to +1.
Then, when the unit spawns spiders, check the summoner's custom and if i.e. custom = 2, move the spiderlings to region 2..
But don't know if it's right
 
Status
Not open for further replies.
Top