This is a td game I'm making and want to spawn all the previous wave units ( 1 each) on my last wave.
I need help on this, if someone knows plz reply !
Thx very much!
Create a unit type array.
(you can also use this for rounds, but I digress)
add each unit type of every unit ever spawned.
at the last round pick each integer or for each integer (for the purposes of this little explanation, I'll be using pick each integer, but both should work.)
Create unit UnitArray[Picked Integer] at SpawnPoint.
You can also add these units to the array as each round starts or finishes, to save time and energy.
My Addition to All Those Leveling Assets Out There.
My Website which contains a list of notable SCII Maps and FtP games and my Journal.
Thx a lot! Althogh I didn't try it out yet it makes a lot of sence !
Other issue i have is that i dont want to set the life for each wave unit in the data, I rather make a multiplyer in trigger somehow..
Someting like this :
I set wave 1 units life to lets say 100 ( through unit properties trigger I assume) so the first wave unit would have 100 life, than i'd like to multiply this with 1.2 for the next wave and
I want to muliply wave 2's wich would be (100x1.2=)120 with 1.2 wich than be (120x1.2=)144 for wave 3 and so on ..
I want to do it this way so I can make different difficulty lvls a lot easier since all i would need to change is the 1st wave's life to lets say 80 for easy mode ( wave 2 would have 96 life ) and 120 for hard mode ( wave 2 would have 144 life ) and 100 would correspond to normal mode ( wave 2 would have 120 life ).
Is this achievable?
I'll attach a map in a moment which will explain the process.
I haven't tried all units, but it should work.
There are two ways to use it:
1. increasing the multiplication constant and not the health each "round"
2. increasing the health but not the multiplication constant each "round"
I wasn't sure which one you wanted. They both work virtually the same, the value produced is just different.
Thx a lot for the tip !
i want to make the 1 where the multiplication stays the same, but the health changes kinda like a chain reaction.
So if i set the 1st waves health to 100 and multiply that with 1.2 for wave 2 -wich = 120- will it remember wave 2's health and multiply that amount with 1.2 for wave 3 -wich is 144 (120*1.2) , than will it remember wave 3's health and multiply that with 1.2 for wave 4 - that would come to 173- and so on or i have to add that to"health max" like so?:
health max =100, health max=120, health max=144, health max=173 and so on?
well no, if we are remembering health regardless of units you'll need to store that in a global variable. Then you change the catalog value of the spawned unit to be = the stored variable times the multiplication constant or change the stored value each round to be equal to the old value x 1.2, then just apply the constant as the health value via catalogs.
You must login to post a comment. Don't have an account? Register to get one!