Hello everyone, I've been trying for a while to make a working trigger for garrisons.
Basically I want it to work like in Age of Empires 2 (best example that comes to my head), that is : the building's attack speed varies according to the number of units loaded inside it. And unloading units decreases the attack speed bonus accordingly.
So far, no luck, I've tried many different things. I've a made a custom ability with 5 levels (1st level = 0 units in, 0% attack speed bonus; 2nd level = 1 unit, 10% attack speed bonus etc) and I tried using the "decrease/increase level of ability" action without much success. Maybe I should use triggers instead of abilities?
I want it to work for ANY unit of type "tower x" on the map, including the ones that are built later on during the game (it's a RTS type of map, heavily inspired by AoE).
I've tried with the events "issued order = load/unload/unloadall" as well as with the event "unit finishes casting an ability = load/unload", I also tried setting a custom value that would be the number of units inside the building but that didn't seem to work.
I'm a proper noob with the world editor but I'd gratefuly appreciate some help since appart from this detail, my map is almost complete.
Basically I want it to work like in Age of Empires 2 (best example that comes to my head), that is : the building's attack speed varies according to the number of units loaded inside it. And unloading units decreases the attack speed bonus accordingly.
So far, no luck, I've tried many different things. I've a made a custom ability with 5 levels (1st level = 0 units in, 0% attack speed bonus; 2nd level = 1 unit, 10% attack speed bonus etc) and I tried using the "decrease/increase level of ability" action without much success. Maybe I should use triggers instead of abilities?
I want it to work for ANY unit of type "tower x" on the map, including the ones that are built later on during the game (it's a RTS type of map, heavily inspired by AoE).
I've tried with the events "issued order = load/unload/unloadall" as well as with the event "unit finishes casting an ability = load/unload", I also tried setting a custom value that would be the number of units inside the building but that didn't seem to work.
I'm a proper noob with the world editor but I'd gratefuly appreciate some help since appart from this detail, my map is almost complete.