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

Unit Spawning Problem

Status
Not open for further replies.
Level 8
Joined
Dec 29, 2006
Messages
359
Heres my trigger for spawning waves in a TD.
  • Next Level Timer
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • Set TempPoint = (Center of Spawn <gen>)
      • Unit - Create Levels_Units_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at TempPoint facing Default building facing degrees
      • Unit - Create Levels_Units_Count_Type2[Levels_Current] Levels_Units_Type2[Levels_Current] for Player 12 (Brown) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation( udg_TempPoint )
This action
  • Unit - Create Levels_Units_Count[Levels_Current] Levels_Units[Levels_Current] for Player 12 (Brown) at TempPoint facing Default building facing degrees
creates a certain number of units for the wave.
This action
  • Unit - Create Levels_Units_Count_Type2[Levels_Current] Levels_Units_Type2[Levels_Current] for Player 12 (Brown) at TempPoint facing Default building facing degrees
Should create a separate type of unit for the same wave, but even when it has a value set to both
  • Levels_Units_Count_Type2
and
  • Levels_Units_Type2
The units wont spawn! Anybody know whats wrong?
 
Level 5
Joined
Mar 21, 2007
Messages
155
well it must be with the 2 create units trigger. the way i would go about this is 2 ways.

1 make in the corner of the map an isolated area. then make a trigger with if,then,else functions. and every level (or make a trigger with every 60 secs of game) spawn a type of dummy. and your if,then,else function would say somin like if "level 1" (dummy) is in region isolated then spawn 5 whatevers. else and then keep on going for every level. could be a bit time consuming though.

2=make a trigger for level 1 saying (timer expires e.c.t) create new timer. spawn 5 whatevers. enable level 2 trigger. disable this trigger. and level 2 trigger would say exactly like level 1 but with the new units. and keep going on

hoped that helped ;)

p.s sorry. both are slightly time consuming. can't think of anything else unless you resort to jass (uhh i hate it)
 
Level 8
Joined
Dec 29, 2006
Messages
359
I can see how both of those would work, its just that im pretty sure theres a small error somewhere in my triggers cuz the first type of units spawn correctly, but the type 2 units dont spawn for some reasoin.
 
Level 8
Joined
Dec 29, 2006
Messages
359
Ended up doing the second solution. It takes a while, and I'm not finished with it yet, but it's working better than what I had before and I have the first seven waves finished. Thanks for the help :infl_thumbs_up:
 
Status
Not open for further replies.
Top