Summoned Units and shops

Level 5
Feb 27, 2009
Hey, I have two problems that I do not know how to code.

The first one is about summoned units. With my AI characters, they make summoned units like normal. However, the summoned units will just stand there unless attacked. Is there any good decent trigger that assigns the summoned units to follow the caster? I've tried but haven't been able to get it to work.

Second, is that I have a building with upgrades that anyone on a team can click on and choose an upgrade. The way how I made this work was for the "upgrades" to actually be dummy units. When an upgrade occurred, the dummy unit would enter the map and immediately disappear due to a trigger.

I use the 'unit enters camera area' (i.e. the map) for the event. A big problem has occurred that while this method works, if I do too many then my map will not function correctly. Apparently too many events for looking for a unit entering map boundaries causes the game to malfunction.

I would be grateful for any advice on how to solve these two problems I've had!
Level 6
Jan 6, 2006
You could solve your first problem by storing your summoned units in a struct and then periodically ordering them to move/attack to the position of your summoner. While looping you have to check if the summoned unit is still alive. If not simply remove/destroy the struct.