- Joined
- Jul 5, 2005
- Messages
- 19
Is there a way to iterate though all units inside another unit? There's a boolean that you can test if a single unit is inside another one, but for some reason units in transports don't get iterated though even when pick every unit in the entire map reigon. I guess I'll have to have the custom value of the building point to a unit group variable, and take units in and out of it as they garrison and ungarrison. I'm also tring to get the effect that units heal when inside a building. I tried negative values for devour but that doesn't work. I guess I'll just have to do a periodic and loop though the units inside with the variable... although I don't like having too many periodic triggers, timing can get wacky with them.
Also an annoying thing is that when you click a building, the units will walk to it, but when they get there they don't get inside! Right now I'm using call to arms, so only one type of unit can enter, but I am having triggers garrison and ungarrison units. I'm designing a steal game where durring day all units are up and about defending the town, and at night you can walk around because everyone is garrisoned (or asleep inside). There's a steal ability for the thief that can steal from units in buildings by using it on the building, or can steal from units by using it on the unit. For that, I need again to iterate though units in the building.
Also an annoying thing is that when you click a building, the units will walk to it, but when they get there they don't get inside! Right now I'm using call to arms, so only one type of unit can enter, but I am having triggers garrison and ungarrison units. I'm designing a steal game where durring day all units are up and about defending the town, and at night you can walk around because everyone is garrisoned (or asleep inside). There's a steal ability for the thief that can steal from units in buildings by using it on the building, or can steal from units by using it on the unit. For that, I need again to iterate though units in the building.