| 11-28-2007, 07:07 AM | #1 |
Just simple question guys, can I add a buff via trigger? One more , can I use a timer for spell cooldowns, that's all thanks guys! ![]() |
| 11-28-2007, 10:33 AM | #2 | |
To add an buff, just add a modified Tornado Slow Aura Quote:
You can't influence the cooldown of abilities with triggers, there's only one exeption: Reset all cooldowns. But what do you want to do with such timers? Maybee there's a workaround... |
| 12-02-2007, 02:44 PM | #3 |
Hey XieLon thanks! about the cooldowns, I had a problem with it using ForGroup with TriggerSleepAction because it halts the operation of the callback function. I searched the forums for answers and I learned about executefunc which could enable me to put waits on callback functions. About the timers, I just didn't know how to use it on the time I posted this lol, I thought I could use them for cooldowns. Thanks Again + REP |
| 12-02-2007, 10:25 PM | #4 |
Hm, sry, i dont really get now the connection between your ForGroup issue and the Spell Cooldown... but: I have a solution for the impossible wait within ForGroup-Loops: Put your actions in 2 ForGroup loops and put the wait between them. Or, and that's the better, cause leakfreem, variant, replace your ForGroup with this kind of loop: JASS:local group g = <Your Group> local unit u loop set u = FirstOfGroup(g) exitwhen u == null call GroupRemoveUnit(g,u) //<your ForGroupActions> endloop call DestroyGroup(g) set g=null set u=null But make sure that the group g is no reference on a group which you want to use afterwards, cause it will be empty. To avoid this little issue, you could flag the units (with custom value or attached boolean) instead of removing them from the group. And also you would have to change loop a little (add a controlling loop to the FirstOfgroup where you check the flag) thx for +rep |
