Corpse Explosion Request

Solu9

You can change this now in User CP.
Reaction score
216
If you have played Diablo II you know what I am talking about.

I need a spell which is used on a corpse. The corpse then explodes damaging nearby enemies for 60%-100% of the corpse's health when it was alive.

Ex. A Footman has 100 health points. He is killed. Then Corpse Explosion is used on his corpse which then explodes and damages enemies in a 300 radius from the corpse for 60-100 points of damage.

This is way too complicated for me to complete, so I hope you can help me out.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
First you have to store unit's max life when it dies and then detect the dead unit's life, I prefer you use vJass to accomplish this, AIDS or PUI will help you, as they store units into arrays and then you can detect their max life to make anything you need.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
Make it a point target spell with a small AoE and then pick a corpse within it through triggers. Pretty sure you can detect a dead unit's max hp, so no need for storing it in variables.

@NIP ninja-edited :D
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
Or cannibalize, I prepare you a map with what you want, w8 a while.

EDIT: Feel free to ask me anything

It's written in vJass so you have to use latest jassnewgenpack with latest JassHelper installed.
 

Attachments

  • ExplodeME.w3x
    23.6 KB · Views: 229

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
heres how i would do it...
i would use the ghoul feeding frenzy ability that auto targets corpses as the base ability

Trigger:
  • Corpse Explosion Damage
    • Events
      • A unit finishes casting an ability
    • Conditions
      • Ability being cast is equal to (ability name) is true
    • Actions
      • Set Corpse_Explosion_Damage (real variable) = (Max life of (Target unit of ability being cast))
      • Pick all units within (damage range) of target of ability cast and do actions
        • If, then, else do actions
          • If (Conditions)
            • Owner of picked unit is an enemy of owner of triggering unit
          • Then (actions)
            • Unit - Cause triggering unit to deal damage to picked unit equal to (math for damage based on Corpse_Explosion_Damage)
          • Else (actions)


you would also have to change the duration of the frenzy ability to 0 and the heal to 0 and the range to w/e u want it, and u can also lower the cast backswing on the unit with the ability so the unit doesnt keep sitting there casting on nothing after it finishes, or you could add an action telling the unit to stop after it deals the damage
 

Solu9

You can change this now in User CP.
Reaction score
216
Sorry I havn't checked it yet since Im currently very busy testing a map with a friend. I'll get back to you once I have the time.

Thanks in advance :)
 

Solu9

You can change this now in User CP.
Reaction score
216
Solu9 why you don't get the map I made with the spell you need??

Click Me !

Oh didn't see your post. Well it is in vJass, and from what I know it will charge everything into vJass thus I won't be able to keep on working in GUI?
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
NONONO its only for this trigger, just copy the triggers inside your map and the ability CE and the unit DUMMY because I use dummy caster system.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Why not base the spell off Animate Dead? Then have a periodic check for units with the Animate Dead buff, kill them and deal damage to all units within range for (60-100) /100 * the unit's maximum life. Since Animate Dead basically makes a copy of the dead unit, you don't need to store anything.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
I think he wants to target one corpse man. That's why I made it like this. And I don't store anything, it was totally wrong what I said at the second post.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
How do you target a corpse? AFAIK corpses can't be targeted. Even so, you could always modify Channel and make a dummy cast Animate Dead at the corpse's location, with a minuscule AoE.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
Of course not, I just get the units in 85 range of target point, check witch is closest corpse, remove it and add a blowing or something effect.
 

Solu9

You can change this now in User CP.
Reaction score
216
I have tested NoobImbaPro's map and the Corpse Explosion works very well.

A further request though. Could you make the "exploding corpses" have a more crazy explosion effect? The Human Mortar Team Attack Ground explosion?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you can add an action that runs another trigger creating the desired effect
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
In the trigger I gave you solu9 you at top a field called GLOBALS-ENDGLOBALS
Inside that field there are some variables, so you can modify them. When you choose a special effect and press ok you go to the window with the effect list. Now click the effect you choose and edit it. Now at the very bottom of the window you see it's path.
Copy and paste it inside the string:
Now this is the effect I have chosen:
JASS:
private constant string SpecialEffect = "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl"

As you see is inside these "" witch defines the path as a string variable. Also you see the double "\" witch defines that is that symbol, because there are others like \n (line chance), \b (backspace), etc....

And now put there the one you want to change the effect of your ability. In trigger I added comments to help you understand what I am doing. Comments are the green characters
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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