Spell Help!

Spray-

Member
Reaction score
1
Heya guys! Im doing a spell that resembles the Spirit of Redemption (priest holy talent spell) from WoW. Basically when the Hero dies, it turns into a different unit, is invurneble and can cast any spells free of cost for a few seconds and then dying properly.

Everything works fine except the "Event" to activate the spell. Im not letting the Hero actually DIE to actvate it, cause that would F* my hero revival triggers, so ive done this:

Code:
Events
    Unit - Priest 0016 <gen>'s life becomes Less than or equal to 50.00
Conditions
    (Priest 0016 <gen> has buff Brilliance Aura) Equal to True
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Spirit of Redemption  for Priest 0016 <gen>) Equal to 1
    Then - Actions
        Unit - Pause Priest 0016 <gen>
        Unit - Make Priest 0016 <gen> Invulnerable
        Animation - Play Priest 0016 <gen>'s death animation
        Wait 1.33 seconds
        Special Effect - Create a special effect attached to the origin of Priest 0016 <gen> using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (140.00%, 140.00%, 140.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (180.00%, 180.00%, 180.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (220.00%, 220.00%, 220.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (260.00%, 260.00%, 260.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (300.00%, 300.00%, 300.00%) of its original size
        Unit - Add Divinity  to Priest 0016 <gen>
        Set SpiritOfRedON = True
        Animation - Play Priest 0016 <gen>'s stand animation
        Set SpiritEffect = (Last created special effect)
        Unit - Unpause Priest 0016 <gen>
        Wait 10.00 seconds
        Animation - Change Priest 0016 <gen>'s size to (260.00%, 260.00%, 260.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (220.00%, 220.00%, 220.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (180.00%, 180.00%, 180.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (140.00%, 140.00%, 140.00%) of its original size
        Wait 0.10 seconds
        Animation - Change Priest 0016 <gen>'s size to (100.00%, 100.00%, 100.00%) of its original size
        Wait 0.10 seconds
        Unit - Remove Divinity  from Priest 0016 <gen>
        Unit - Make Priest 0016 <gen> Vulnerable
        Unit - Kill Priest 0016 <gen>
        Special Effect - Destroy SpiritEffect
        Set SpiritOfRedON = False

The SpiritofRedON is used for another trigger that puts the Hero's mana to 100%.

Basically the question is: Because some.. attacks/spells could get the Hero from 100 to 0, thus not triggering the Trigger, how would i bypass this? Is there a way to "Block" the excessive damage dealt?

Thanks in advance :)
 

jig7c

Stop reading me...-statement
Reaction score
123
first of all you don't have any actions... j/k :)

for the event, try using a percentage of life, so when the preist's life falls below 5% of his hp, this trigger gets started...
 

emilemil1

New Member
Reaction score
20
Make it detect when it dies, then add a set of conditions on the revive trigger.

That would work right?
 

jig7c

Stop reading me...-statement
Reaction score
123
you might have to create another trigger that'll link the revive trigger, and this ability trigger... and then make it so that the revive trigger recognizes it

in your ability trigger, make the event a unit dies
and then set the first action to set HeroisDead = False


a unit dies
dying unit has the buff spirit of redemtion
wait 10 seconds,
set HeroisDead = True
if
set heroisdead = true
then add dying unit to revive trigger
else
do nothing
 

emilemil1

New Member
Reaction score
20
Use the die event!

As the first action u use something like Set Dead = False (make it default true so it doesnt screw up before the spell is used for the first time)
As the second you use a reviving set of actions (leak free ofc)
Make the hero revive instantly and pause as you wanted
Then you run all the normal actions.
When the spirit dies you kill the hero too and Set Dead = True

As the first action of the revive (and every trigger checking for death), make it a wait action, maybe 0.01 seconds is enough for the spell trigger to set the Dead variable
Finaly a condition:

If Triggering Unit equal to Priest 0016.

Then

If Dead equal to True

Then

(execute normal revive actions)

Else

Do Nothing

Else

(execute normal revive actions)

It looks long but should not take more than 5 min to do.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Try using the Unit - <Unit> takes damage event. (If you have to, use the Trigger - Add Event to use a variable for the unit).

This actually fires before the unit takes damage. This way, you can compare the unit's health with the amount of damage it is about to take, and if he/she's about to die, give it invulnerable/unlimited mana.

Also, Spray- is right. When a unit dies, it loses any buffs it has, even before the trigger fires.

Damage detection is just about the best way to deal with it, as it avoids the actual death. If you just use (Life of unit) becomes less than or equal to *amount*, units can jump past the amount (like 5%) straight into death, if they fight a strong enough enemy. I am not sure, but the "A unit dies" event may fire before this event does.
 

emilemil1

New Member
Reaction score
20
The only downside with using damage detection is that it takes up more space to MUI (each tracked unit takes up space i guess), Unit Dies is global and checks all at the same time.

But since u only have one it would not be a problem :) otherwise i guess tons of events would slow the execution down? Or am I totaly off track here?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top