| 05-23-2008, 12:08 AM | #1 |
I wanted to know if it was possible to give a unit an "item" ability but only for a certain amount of item. EXAMPLE: A dummy ability based on cripple should give the targeted unit +4 strength for thirty seconds. Is this possible and if so how should I do it? Thanks ![]() |
| 05-23-2008, 12:17 AM | #2 |
Well, there are a couple of ways to do it, using timers and using waits. The way with waits will probably be more relevant to you, so: |
| 05-23-2008, 12:22 AM | #3 |
Wait X Game Time seconds is Polled Wait, shouldn't you use TSA instead? (regular "Wait X seconds" in GUI) |
| 05-23-2008, 12:25 AM | #4 |
lol that was quick but is using wait going to make the ability Not MUI? and what does TSA stand for? |
| 05-23-2008, 12:30 AM | #5 |
TSA is TriggerSleepAction which is the JASS version of "Wait X Seconds". As far as I know, PolledWait (Wait X Game-Time Seconds) is what should be used because TSA runs even through game pause events and it can cause desyncs by expiring at different times on different computers. And yes, that is still MUI because no variables are being used. You're just referencing Triggering Unit, which still retains its proper value after a wait. |
| 05-23-2008, 12:58 AM | #6 |
Thank you all =) One more thing would using Target Unit of Ability being cast still keep it MUI? |
| 05-24-2008, 09:34 AM | #7 |
It's not that it would make it non-MUI, it's just that it wouldn't work. Target Unit of Ability Being Cast does not retain its value after a wait. |
| 05-24-2008, 02:43 PM | #8 |
oh... that would explain a lot of things. Thanks that will be all for now =) |
