HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting when a hero stops using Immolation

11-20-2006, 11:12 PM#1
Pyrogasm
Ok, here's the problem: I have an ability based off of immolation in order to have it drain mana until deactivated. When the hero turns on the ability, I have to use a spellbook to dynamically add 2 aura abilities to make the spell look pretty. What event can I use to detect when the unit turns off the immolation-based spell so that I can remove the spellbook? My best course of action so far is this:
Trigger:
Collapse Trigger to add spellbook abilities
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Planar Disruptance
Collapse Actions
Unit - Add Planar Disruptance Spell Book to (Triggering unit)
Unit - Set level of Planar Disruptance (Dummy, Enemy) for (Triggering unit) to (Level of Planar Disruptance for (Triggering unit))
Unit - Set level of Planar Disruptance (Dummy, Friend) for (Triggering unit) to (Level of Planar Disruptance for (Triggering unit))
Trigger - Turn off this trigger
Wait 0.05 seconds
Trigger - Turn on Trigger to remove spellbook abilites <gen>
Collapse Trigger to remove spellbook abilities (Not initially on)
Collapse Events
Unit - A starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Planar Disruptance
Collapse Actions
Unit - Remove Planar Disruptance Spell Book from (Triggering unit)
Trigger - Turn off this trigger
Wait 0.05 seconds
Trigger - Turn on Trigger to add spellbook abilities <gen>
But it doesn't work properly. The first time I cast and then stop the spell, the 1st trigger adds the spellbook and the 2nd trigger does nothing. The second time I cast and then stop the spell, the 1st trigger does nothing (I think it's because it's still disabled because the 2nd trigger doesn't fire the first time) and the 2nd one removes the spell! Can someone please try to help with this?
11-21-2006, 01:37 AM#2
Daxtreme
Trigger:
Unimmolation
Collapse Events
Unit - A unit is issued an order with no target
Collapse Conditions
(Issued order) Equal to unimmolation
Collapse Actions
----- Actions -----
11-21-2006, 05:24 AM#3
Pyrogasm
Wow, that was dumb. Thanks!
11-21-2006, 06:01 AM#4
Pyrogasm
Ok, so I tried what Daxtreme suggested for the trigger, and it works marginably... the first few times. Maybe I should clarify exactly what I am trying to do so that this problem can be better addressed: I have a spell, Planar Disruptance, that can be activated, but drains mana per second until deactivated (based off of immolation). When the unit activates Planar Disruptance, I use a dummy spellbook to add 2 dummy auras to the hero (1 for frendlies and 1 for hostiles; the spell does different things to frendlies and hostiles), using this trigger:
Trigger:
Start
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Planar Disruptance
Collapse Actions
Unit - Add Planar Disruptance Spell Book to (Triggering unit)
Unit - Set level of Planar Disruptance (Dummy, Enemy) for (Triggering unit) to (Level of Planar Disruptance for (Triggering unit))
Unit - Set level of Planar Disruptance (Dummy, Friend) for (Triggering unit) to (Level of Planar Disruptance for (Triggering unit))
To get rid of the dummy spellbook abilities when the spell is deactivated, I use this trigger:
Trigger:
Stop
Collapse Events
Unit - A unit Is issued an order with no target
Collapse Conditions
(Issued order) Equal to (Order(unimmolation))
Collapse Actions
Unit - Remove Planar Disruptance Spell Book from (Triggering unit)
The first time I tell the hero to activate Planar Disruptance, the dummy abilities are added and the auras work perfectly; when I turn off Planar Disruptance the first time, the dummy abilites go away. On the second or third test, however, only one of the dummy auras gets added, but the graphic for the one not added still shows up (I'm using brilliance and devotion aura graphics for dummy abilities A and B for testing purposes) and the units that it supposed to give the aura buff to don't gain it. This malfunction happens at random, but the hero cannot usually go more than 3 activations/deactivations without it happening. Aside from that, there is roughly a 2 second delay when Planar Disruptance is stopped; the dummy auras go away, but the units still have the buff for a few seconds! This is not something I want because I will be using triggers to detect spell casts of units with either of the 2 dummy aura buffs...

What am I doing wrong?
11-21-2006, 06:16 AM#5
BertTheJasser
The buffs of the auras staying on the units is caused by the horrible refresh-rate of blizzards auras(~5s).
Another possible bug cause is, that when immolation gets stopped ('unordered'),it will receive the unordere order twice, which will make your trigger fire twice, instead of once.

Quote:
frendlies
I guess you mean allied units
11-21-2006, 07:00 AM#6
Pyrogasm
Quote:
I guess you mean allied units
Yes, that is what I meant. Hooray for Blizzard's aura refresh rate!
11-21-2006, 12:31 PM#7
Daxtreme
Replace Unit - A unit starts the effect of an ability

to

Unit - A unit is issued an order with no target
(Issued order) Equal to immolation