Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Well, I tried making a last spell as a replacement for Jaina's Mass Teleportation,
called Disruption, Jaina tries channeling a ball of lightning like thing, after 4 seconds, it explodes and takes away 450 mana and takes away hp half of the mana that was taken, propably 225.
Now the problem is, Jaina must keep channeling the spell until it explodes, but when she cast it, she didn't do here channel animation and can move while the spell is already channeling, I want here to keep channeling it until it explodes, when she moves or do something, the spell must be stop, but I have no idea what kind of trigger it must use, so I turned here for help, anybody have an idea,
Here's the current trigger, still figuring on what kind of trigger I will use to keep Jaina channeling the spell and if she do something, the spell stops
First of all:
You should consider using the starts the effect of an ability event instead of "begins casting an ability", because the latter fires before any mana is taken, before cooldown starts, etc. while the first fires after such things have been resolved.
You should also use (Triggering unit) instead of (Casting unit) as it is better for various reasons.
When creating dummy, refer to the owner as (Owner of (D_caster)) to prevent unneeded function calls.
About D_UnitExplodeFx - change it's "Combat - Death Type" field to "Can't raise, does not decay" and "Animation - Death Time" to "0.10". After you create this unit, give it a time life via trigger to 0.3 seconds. That way you don't have to care about the unit, nor give there any wait actions.
You leak location and unit group. You should destroy "D_TargetArea" once you're done with it; and for the unit group at the end you should place the custom script:
Custom script: set bj_wantDestroyGroup = true
before the unit group action (this custom scripts automatically destroys the next created unit group after the trigger is done using it).
And while I don't really have much to say about how this spell works, maybe you should consider the damaging part of your trigger. From what you wrote, it sounded like mass Mana Burn (takes mana and deals 0.5*taken_mana damage). Currently your trigger has static value set for damage - 225. It doesn't take into account units that have less than 450 mana.
You should also consider using timers instead of waits as they're inaccurate and not really good for multiplayer maps (if your map is supposed to be multiplayer).
Now for your problem:
Make a boolean variable called for example D_finished. When Jaina starts casting the spell, set the value for the boolean to False.
Make second trigger, that fires when Jaina finishes casting an ability. The only thing this trigger does is that it sets boolean variable D_finished to True.
Now make a third trigger that fires when Jaina stops casting an ability. This trigger destroys the lightning ball effect and then through If/Then/Else checks the value of "D_finishes" variable.
If the value is
a) True - do all the stuff like damaging nearby units, etc.
b) False - the spell has been interrupted, do all the stuff that's supposed to happen when interrupted (if something is supposed to happen in the first place).
This way you can get rid of all the ITEs in the first trigger that check the current stat of D_caster and the final actions (damaging nearby units) should be in the third trigger.
The reason for this is simple: The event unit finishes casting an ability fires when unit successfully finishes casting the spell without any outside interruption. It also fires before the unit stops casting an ability event.
And the unit stops casting an ability event fires whenever unit stops it - be it that it finishes the spell, or that it got interrupted by an outside source (e.g. new order given by the player, getting stunned, etc.).
Since the value of the boolean is set to "False" all the time, the spell won't deal any mana and hp damage until the event "finishes casting ..." fires, in which case the boolean value is set to "True".
The triggers should look like this:
Start
Events
Unit - A unit starts the effect of an ability
Conditions
(Ability being cast) Equals to Disruption
Actions
Set D_finished = False
Set D_Caster = (Triggering unit)
... etc.
Finished
Events
Unit - A unit finishes casting an ability
Conditions
(Ability being cast) Equals to Disruption
Actions
Set D_finished = True
End
Events
Unit - A unit stops casting an ability
Conditions
(Ability being cast) Equals to Disruption
Actions
Unit - Remove D_dummy from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
D_finished Equal to True
Then - Actions
do actions for when unit finished the spell successfully
Else - Actions
do actions for when the spell has been interrupted
Ok, well, there may be a change of plans, I kinda change something, and, I'm running out of options,
Here is the new trigger,
Well, this time, When Jaina cast the lightning ball, it has 5 phase, when Jaina is stoped from casting, it explodes deals 300/350/400/450 mana drain and half the damage of mana drain, well problem is everything, Well, I'm kinda almost out of options so heres the map on where this is, really need help on this spell, since I'm too
So you want to have a spell that you charge the lightning orb etc etc etc...
Why not use casting time/channel time?
You can simulate the mana cost to do everything nice. (Even keeping the original mana cost stuff in the description.)
And you use Starts the effect of an ability as the detonation.
Here's your test map. I think it does what you want but it's not MUI.
Jaina will channel Disruption for 4 seconds and if she stops the dummy dies and nothing happens. If she succeeds, the spell damages both mana and life of enemies.
It doesn't target magic immune, structures and flying units.
It's based on Channel so you can just just edit the ability to suit your needs.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.