| 08-10-2002, 11:31 AM | #1 |
For my new dungeon keeper map i'm trying to spawn units when you have build several buildings, and you can only have 6 types of each unit. But for some reason this won't work. This is how i scripted it: Event- Every 90.00 seconds of game time Conditions - Number of units in TotalUnits[1] Less than or equal to 6 Actions- Unit- create 1 Warlock for player 1 at center of Portal Player 1 facing default building facing degrees Unit Group - Add last created unit to TotalUnits [1] If number of TotalUnits[1] is greater than or equal to 6 then do Unit- remove last created unit else do Game - text message The last trigger is a 'fail-safe device' i implemented but as with the condition this doesn't work either. Resulting in insane hordes of beetles and fly's running over your screen before you can get to the good creatures like bile demons and mistresses. I need help! By now it's become clear to me that this map is truly EVIL like the game it was based on, seeing how many times things didn't work as planned LOL :D Pencilgod |
| 08-10-2002, 02:37 PM | #2 |
Hmm ... i dunno know what you want but i see a little bug in the trigger. the last action "if number... or equal to 6 ... text message" You have to set the number to 7 or othwerwise the game will also remove a unit if there are 6 units and then there are only 5 but you wanted to have at most 6 units but so you never could have 6 units when the time is over and you have 5, you understand ? ^^ |
| 08-10-2002, 02:40 PM | #3 |
Yes i meant to do that, because 6 was too many units of one type after all, since i have like 12 types of units not included the workers. But thanks for your help anyway, i use a integer array now instead of a unit group array and it works perfectly. |
| 08-10-2002, 06:20 PM | #4 |
Arrays of unit groups don't work quite right. You need to define each element of the array before it'll work. IE: Make a new unit group variable (call it a) and set the unit group array [x]=a then make another one(b) and set the array [x+1]=b ect |
| 08-10-2002, 07:42 PM | #5 |
Thanks for the tip, but take it easy, it's already working like i want it to! Thanks anyway man. :D |
| 08-11-2002, 08:35 AM | #6 |
Guest | Go here and get goldenUrGs new trigger patch. It has the action: Set max units by type which will solve your problem and only need one action to work for all the spawns. battle.net (goldenURGs post) |
| 08-11-2002, 08:53 AM | #7 |
VERY MUCH THANKS! IF I HAD THIS WHILE I WAS CREATING THE MAP, IT WOULD'VE SPARED ME A LOT OF WORK AND HEADACHES! THANKS!! :D :D |
| 08-11-2002, 07:40 PM | #8 |
Hey, look its Dungeon Keeper! |
| 08-12-2002, 10:00 AM | #9 |
Hey Thunder, if you like Dungeon Keeper, have a look at the Retail Map section at the post where i wrote what the map is going to contain. |
