# Loop unit spawn -1 reply

beier

TFT

50 XP

15th October 2004

41 Posts

#1 13 years ago

I cant make this trigger work.. it works up to 2 sets of spawns.. then no more.. Got thease variables Integer:

• Number_of_diffrend_units
• Gold_dropped (array from 1-10)
• Number_of_attacking_units (array from 1-10)

Unit type:

• Attacking_unit (array from 1-10)

Want multiple units pr level - using the Number_of_diffrend_units to set the number of diffrend units in the coming wave. Using Gold_dropped to set the ammount of gold awarded to kill the unit. Using Number_of_attacking_units to set the number of units spawned of one type. Using Attacking_unit to set the unit type i want to be spawned. First i have a trigger like this to set the variabels Set number_of_diffrend_units = 5 Set attacking_unit [1] = archer 1 Set Gold_dropped [1] = 1 Set Number_of_attacking_units [1] =10 Set attacking_unit [2] = archer 2 Set Gold_dropped [2] = 2 Set Number_of_attacking_units [2] =20 Set attacking_unit [3] = archer 3 Set Gold_dropped [3] = 3 Set Number_of_attacking_units [3] =30 Set attacking_unit [4] = archer 4 Set Gold_dropped [4] = 4 Set Number_of_attacking_units [4] =40 Set attacking_unit [5] = archer 5 Set Gold_dropped [5] = 5 Set Number_of_attacking_units [5] =50 Then the spawn trigger From each (integer A) from 1 to number_of_diffrend_units do actions [indent]From each (integer B) from 1 to Number_of_attacking_units[(integer A)] do actions Unit - create 1 attacking_unit [(integer A)] for player 12 (brown) at random point in Region 001 facing default building degrees. wait 0.50 seconds [/indent]

beier

TFT

50 XP

15th October 2004

41 Posts

#2 13 years ago

hmm.. guess i may have gotten this tread out here a bit 2 fast... found out that when i killed a guy it used integer A to.. so the first one was cancled