HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting toggled ability deactivation

02-04-2008, 11:05 PM#1
SockSquirrelMouthwash
Quick question, is there a way to detect if a toggleable mana draining ability is deactivated? As in I want to get it to where a building has, say, a dummy immolation that drains mana. When the building runs out of mana to maintain the dummy immolation, I want it to detect when it automatically deactivates the immolation. Note that I'm not talking about to where the player does it manually.

Bonus question - is there a way to make buildings have buffs?

Thanks in advance!
02-04-2008, 11:58 PM#2
Pyrogasm
You need to detect when it is issued an order to turn it off. I believe the order is still issued when the unit runs out of mana. Here's how you'd check:
Trigger:
Collapse Events
Unit - A unit is issued an order with no target
Collapse Conditions
(Issued Order) equal to unimmolation
Collapse Actions
Game - Display to (All Players) the text Immolation Deactivated!
02-05-2008, 01:44 AM#3
SockSquirrelMouthwash
Quote:
Originally Posted by Pyrogasm
You need to detect when it is issued an order to turn it off. I believe the order is still issued when the unit runs out of mana. Here's how you'd check:
Trigger:
Collapse Events
Unit - A unit is issued an order with no target
Collapse Conditions
(Issued Order) equal to unimmolation
Collapse Actions
Game - Display to (All Players) the text Immolation Deactivated!

I'm aware of that bit, what I was asking was when the building has it running until it runs out of mana to maintain the ability, is there a way to detect right away when it auto-shuts off?
02-05-2008, 05:12 AM#4
Pyrogasm
And as I said, I believe that that event fires when the ability auto-shuts off.
02-05-2008, 05:18 AM#5
Rising_Dusk
Just run a timer and check for the buff that immolation-based abilities have. If they don't have the buff, they turned it off. That's what I do, works like a charm.
02-05-2008, 01:29 PM#6
SockSquirrelMouthwash
Quote:
Originally Posted by Pyrogasm
And as I said, I believe that that event fires when the ability auto-shuts off.

I gave it a try recently, no dice :(
Only seems to work when I manually click it to deactivate

Quote:
Originally Posted by Rising_Dusk
Just run a timer and check for the buff that immolation-based abilities have. If they don't have the buff, they turned it off. That's what I do, works like a charm.

I'm trying to get this to work on a building though, which for some reason doesn't like to show buffs on them.
02-05-2008, 02:05 PM#7
chobibo
Try doing this on the Object-Buff editor or the Object-Abilities Editor Targets Allowed: STRUCTURE
02-05-2008, 07:54 PM#8
SockSquirrelMouthwash
Quote:
Originally Posted by chobibo
Try doing this on the Object-Buff editor or the Object-Abilities Editor Targets Allowed: STRUCTURE

Tried it, no buff :(
02-06-2008, 02:23 AM#9
Pyrogasm
The buff is there, buildings just don't show buffs.
02-06-2008, 03:05 AM#10
Alevice
Quote:
Originally Posted by Pyrogasm
The buff is there, buildings just don't show buffs.

Actually, they do, under circumstances I have failed to determine. Still, they should have a buff wether it is graphically shown or not.
02-06-2008, 05:35 AM#11
SockSquirrelMouthwash
Quote:
Originally Posted by Alevice
Actually, they do, under circumstances I have failed to determine. Still, they should have a buff wether it is graphically shown or not.

Will a check on if that buff "ability" level > 0 register?
02-07-2008, 12:04 AM#12
Pyrogasm
Yes.
02-07-2008, 01:54 AM#13
SockSquirrelMouthwash
Quote:
Originally Posted by Pyrogasm
Yes.

<3
11-20-2008, 05:48 PM#14
Kyrbi0
Sorry to BUMP this thread, but I believe I have an alternate solution...
(Note: I didn't actually make this)

Trigger:
YourAbility
Collapse Events
Unit - A unit Is issued an order with no target
Collapse Conditions
((Issued order) Equal to (Order(unimmolation))) or ((Issued order) Equal to (Order(immolation)))
(Unit-type of (Triggering unit)) Equal to YourCastingUnitType
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Issued order) Equal to (Order(immolation))
Collapse Then - Actions
Trigger - Add to YourAbility TurnOff <gen> the event (Unit - (Triggering unit)'s mana becomes Less than 10.00)
Unit - Add YourDummyPassiveAbility to (Ordered unit)
Unit - Set level of YourDummyPassiveAbility for (Ordered unit) to (Level of YourAbility for (Ordered unit))
Skip remaining actions
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Issued order) Equal to (Order(unimmolation))
Collapse Then - Actions
Unit - Remove YourDummyPassiveAbility from (Ordered unit)
Skip remaining actions
Else - Actions

Trigger:
YourAbility TurnOff
Events
Conditions
Collapse Actions
Unit - Remove YourDummyPassiveAbility from (Triggering unit)

Specifically, this caught the Order and "Unorder" of the Dummy ability on the hero (based off of Immolation), and Added/Removed a dummy ability which was the actual "effect" of the Hero's ability. (Critical Strike)
11-20-2008, 11:16 PM#15
Pyrogasm
Yeah, this is relevant and all, but next time just post your own topic asking if your method might work, if you don't want to test it yourself.

And for clarification purposes, that would work. You'd start to build up events after a while, but aside from that it would function properly. A better way to do it would be to add events to the 2nd trigger with a 3rd trigger whenever a unit learned the immolation ability instead. This would register, on the whole, less events.