Garrison that increases the building's attack speed

Status
Not open for further replies.
Level 1
Joined
Jun 7, 2009
Messages
4
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.
 
Level 1
Joined
Jun 7, 2009
Messages
4
Well it works but :

-the building can't attack when there are 0 units in it (or is there a workaround for that?)

-it only works with 1 specific type of unit (though this point is irrelevant - I'm fine with archers being the only unit increasing the tower's attack speed).

-also, does anyone know by how much % each unit boosts the speed?
 
Last edited:
Level 1
Joined
Jun 7, 2009
Messages
4
Update : ok I think that will do. I've used a custom phoenix fire type ability so that my towers can attack without units in it, it's not perfect but it works properly at least.
 
Status
Not open for further replies.
Top