HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Buff Issues with World Editor

03-17-2006, 11:51 AM#1
buttoxide
I currently have some issues with detecting buffs via the boolean "Unit has buff". My spell idea is to have an ability that places a buff for a duration, then explodes the target if it still has the buff on.

However, the boolean fails every time (returns a false value) I try it even though the buff is clearly on the unit, (the duration is 1 second longer than the wait time to be extremely sure) does anyone know why or have a better solution than my craptacular triggering?

I am using WEU 1.20, hope it isn't the cause of this problem.

Thanks in advance...

Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Slow
Collapse Actions
Wait 5.00 game-time seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Target unit of ability being cast) has buff Slow) Equal to True
Collapse Then - Actions
Game - Display to (All players) the text: boom (test)
Unit - Create 1 NULL Avul for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing (270.0) degrees
Unit - Add Firebrand's Curse boom (firelord boom) to (Last created unit)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to frostnova (Target unit of ability being cast)
Else - Actions
03-17-2006, 12:05 PM#2
Captain Griffen
((Target unit of ability being cast) has buff Slow) Equal to True

Target of ability being cast only occurs on begining of casting, and is then lost. Try triggering unit.
03-17-2006, 12:22 PM#3
buttoxide
Thanks for the reply! However, I just tried, and Triggering Unit refers to the casting unit, not the unit being cast on, so it doesn't help for this case.

I amended the trigger to this, still no luck (the text message "failed (test)" came up which meant the condition still isn't working):

Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Slow
Collapse Actions
Custom script: local unit udg_TEMPUnit
Set TEMPUnit = (Target unit of ability being cast)
Wait 5.00 game-time seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(TEMPUnit has buff Slow) Equal to True
Collapse Then - Actions
Game - Display to (All players) the text: boom (test)
Unit - Create 1 NULL Avul for (Owner of (Casting unit)) at (Position of TEMPUnit) facing Default building facing (270.0) degrees
Unit - Add Firebrand's Curse boom (firelord boom) to (Last created unit)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to frostnova TEMPUnit
Else - Actions
Game - Display to (All players) the text: failed (test)
03-17-2006, 04:08 PM#4
Captain Griffen
Quote:
Originally Posted by Captain Griffen
((Target unit of ability being cast) has buff Slow) Equal to True

Target of ability being cast only occurs on begining of casting, and is then lost. Try triggering unit.

Read.
03-17-2006, 07:08 PM#5
shadow1500
He wants to apply the effect to the target though, buttoxide mentioned it aswell:
Quote:
I just tried, and Triggering Unit refers to the casting unit, not the unit being cast on, so it doesn't help for this case.
03-17-2006, 07:15 PM#6
Anitarf
Yeah, cast event responses are bugged like that and don't work after waits. You should use a local variable, set it point to the target unit before the wait, and after the wait, set a global variable to point to the same unit the local is pointing at, and use that global variable in your actions.
03-17-2006, 09:00 PM#7
Captain Griffen
Odd that triggering unit refers to unit being cast on for Unit starts effect of ability...very odd, since that means that you can't actually get the unit starting the effect of the ability.