So I set up a spawn system for my tower defense, where it spawns 1 unit every .5 seconds until it spawns 30 units. The spawning is working fine, but I get an issue with my leaderboard and when a unit dies. Its suppose to increase the player kill count by 1 and add minerals to the player, but it only does this after the 30th unit of that wave spawned. So if I kill any units before that 30th one spawns, I will get no minerals and it wont count towards my player kills. After it spawns, I recieve minerals and the leaderboard works properly for every kill after it. This is only a issue with the first wave, all waves after this have no issue with the last unit at all. In sc2 it says theres an error in my function unit dies, it says something about arrayunderflow. Here are some screenshots of my triggers. Thanks!
Hey all,
So I set up a spawn system for my tower defense, where it spawns 1 unit every .5 seconds until it spawns 30 units. The spawning is working fine, but I get an issue with my leaderboard and when a unit dies. Its suppose to increase the player kill count by 1 and add minerals to the player, but it only does this after the 30th unit of that wave spawned. So if I kill any units before that 30th one spawns, I will get no minerals and it wont count towards my player kills. After it spawns, I recieve minerals and the leaderboard works properly for every kill after it. This is only a issue with the first wave, all waves after this have no issue with the last unit at all. In sc2 it says theres an error in my function unit dies, it says something about arrayunderflow. Here are some screenshots of my triggers. Thanks!
http://i265.photobucket.com/albums/ii206/plop1920/unitdies.jpg
http://i265.photobucket.com/albums/ii206/plop1920/spawnwaves.jpg