HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Timed Item buffs?

05-23-2008, 12:08 AM#1
dhobby
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
Pyrogasm
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:
Trigger:
Collapse Events
Unit - A unit starts the effect of an ability
Collapse Conditions
(Ability being cast) equal to <Your Cripple Ability>
Collapse Actions
Unit - Add <Your +4 Strength ability> to (Triggering Unit)
Wait 30.00 game-time seconds
Unit - Remove <Your +4 Strength ability> from (Triggering Unit)
05-23-2008, 12:22 AM#3
PurgeandFire111
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
dhobby
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
Pyrogasm
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
dhobby
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
Pyrogasm
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
dhobby
oh... that would explain a lot of things. Thanks that will be all for now =)