Hello Hive, long time no see
I'm trying to make a trigger and I need help understanding the best way to do it, as my ideas as to do this im sure are far from optimal
Basically what I am looking to have done is spawning in units that were purchased previously in the order that they were bought by the player but done so in waves that are determined by a variable. There will also be a limit to how many units can be in each wave, with a system that is much like the Food/Supply system in WC3 that you can upgrade in game
(there are 3 waves to the units that will spawn, that will be changed by selecting certain objects)
Ideally, it would work like this, as an example;
--
--
Like I said, any way that I can think of to do the bulk of this is not really a good method, so I would love some help from someone understands this stuff better than I do.
Also, It does not need to be MUI as there will only be 1 player doing any of this at any given time.
Thanks in advance, Hive.
I'm trying to make a trigger and I need help understanding the best way to do it, as my ideas as to do this im sure are far from optimal
Basically what I am looking to have done is spawning in units that were purchased previously in the order that they were bought by the player but done so in waves that are determined by a variable. There will also be a limit to how many units can be in each wave, with a system that is much like the Food/Supply system in WC3 that you can upgrade in game
(there are 3 waves to the units that will spawn, that will be changed by selecting certain objects)
Ideally, it would work like this, as an example;
--
- Player buys a unit (or uses an ability that acts as a dummy) to buy 3 Ogres, 1 Gnoll, 1 Ghoul, and then 4 more Ogres
- Floating text will appear, showing the names of each unit that was bought in the queue, with a number as well to show. As of now it would read Ogre x 7, Gnoll x 1, Ghoul x 1
- Player selects wave 2, setting another variable, and then proceeds to buy 2 Footmen and 1 Infernal
- Player tries to buy a ghoul for wave 2 but the food is capped out for wave 2
- Player selects wave 1 again and buys the additional Ghoul
- Now the text would read Ogre x 7, Gnoll x 1, Ghoul x 2 in the wave 1 location, and in the wave 2 location it would read Footman x 2, Infernal x 1
- Once another trigger activates, the units begin to spawn in the order that they were bought with a timed delay that can be changed with upgrades (so the timer needs to be editable)
- The units will begin to spawn, Ogre, ogre, ogre, gnoll, ghoul, ogre, ogre, ogre, ogre, Ghoul.
- Once wave 2 starts, it will spawn Footman, footman, infernal.
- (If possible, it would be the best outcome if the player can still add to the list of units to be summoned while the wave is in progress, so for this example, after wave 2 has been defeated but theres still time before the wave ends, the player buys 1 more infernal, and then it is promptly added to the game, and/or they buy it while there are still units in the queue to be spawned and it simply adds it to the queue. This is optional and not necessary but if doable that would be pretty cool)
- Game sees that wave 3 is empty and skips it
- Waves end, and everything is set back to 0 and any stored info destroyed so that the player can start anew for the again coming waves 1, 2 and 3.
--
- Players can buy additional Supply for the waves, increasing the maximum amount
- Players can buy an upgrade that decreases the time between each unit spawning
Like I said, any way that I can think of to do the bulk of this is not really a good method, so I would love some help from someone understands this stuff better than I do.
Also, It does not need to be MUI as there will only be 1 player doing any of this at any given time.
Thanks in advance, Hive.