Spell Desperate Explosion

Vestras

Retired
Reaction score
249
Jass/Gui: Gui
Leakless: Yes
Lagless: Should be
Mui: Negative
Import difficult: No, very easy.

This spell it from my map, Infiltration of the Mountains

Type: Explosion
Buff: None
Cooldown: 90s

Creates a massive explosion around the caster, dealing incredible damage. Very powerfull, even though the caster is weakened much.

Code:
Desperate Explosion Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Desperate Explosion 
    Actions
        Unit - Pause De_Caster[De_TempInteger]
        Set De_TempInteger = (Player number of (Owner of (Triggering unit)))
        Set De_Caster[De_TempInteger] = (Casting unit)
        Set De_CasterLoc[De_TempInteger] = (Position of De_Caster[De_TempInteger])
        Set De_Region[De_TempInteger] = (Region centered at De_CasterLoc[De_TempInteger] with size (700.00, 700.00))
        Set De_UnitGroup[De_TempInteger] = (Units within 700.00 of De_CasterLoc[De_TempInteger] matching (((Owner of (Matching unit)) is an enemy of (Owner of De_Caster[De_TempInteger])) Equal to True))
        Set De_Life[De_TempInteger] = (Percentage life of De_Caster[De_TempInteger])
        Set De_Integer[De_TempInteger] = ((Integer(De_Life[De_TempInteger])) / 2)
        Countdown Timer - Start De_Timer[De_TempInteger] as a Repeating timer that will expire in 0.30 seconds
        Wait 10.00 seconds
        Set De_TempInteger = (Player number of (Owner of (Triggering unit)))
        Countdown Timer - Pause De_Timer[De_TempInteger]
        Unit - Unpause De_Caster[De_TempInteger]
        Unit - Set life of De_Caster[De_TempInteger] to De_Life[De_TempInteger]
        Custom script:   call RemoveLocation(udg_De_CasterLoc[udg_De_TempInteger])
        Custom script:   call RemoveRect(udg_De_Region[udg_De_TempInteger])
        Custom script:   call DestroyGroup(udg_De_UnitGroup[udg_De_TempInteger])

Code:
Desperate Explosion Periodic
    Events
        Time - De_Timer[1] expires
        Time - De_Timer[2] expires
        Time - De_Timer[3] expires
        Time - De_Timer[4] expires
        Time - De_Timer[5] expires
        Time - De_Timer[6] expires
        Time - De_Timer[7] expires
        Time - De_Timer[8] expires
        Time - De_Timer[9] expires
        Time - De_Timer[10] expires
        Time - De_Timer[11] expires
        Time - De_Timer[12] expires
    Conditions
    Actions
        For each (Integer A) from 0 to 12, do (Actions)
            Loop - Actions
                Custom script:   exitwhen GetExpiredTimer() == udg_De_Timer[GetForLoopIndexA()]
        Set De_RandomPoint = (Random point in De_Region[(Integer A)])
        Set De_RandomPoint2 = (Random point in De_Region[(Integer A)])
        Set De_RandomPoint3 = (Random point in De_Region[(Integer A)])
        Unit Group - Pick every unit in De_UnitGroup[(Integer A)] and do (Actions)
            Loop - Actions
                Unit - Pause (Picked unit)
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Environment\LargeBuildingFire\LargeBuildingFire1.mdl
                Unit - Cause De_Caster[(Integer A)] to damage (Picked unit), dealing 4.00 damage of attack type Spells and damage type Normal
                Special Effect - Destroy (Last created special effect)
                Unit - Unpause (Picked unit)
        Special Effect - Create a special effect at De_RandomPoint using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
        Unit - Cause De_Caster[(Integer A)] to damage circular area after 0.00 seconds of radius 700.00 at De_CasterLoc[De_TempInteger], dealing 3.00 damage of attack type Spells and damage type Normal
        Special Effect - Destroy (Last created special effect)
        Special Effect - Create a special effect at De_RandomPoint2 using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
        Unit - Cause De_Caster[(Integer A)] to damage circular area after 0.00 seconds of radius 700.00 at De_CasterLoc[De_TempInteger], dealing 3.00 damage of attack type Spells and damage type Normal
        Special Effect - Destroy (Last created special effect)
        Special Effect - Create a special effect at De_RandomPoint3 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Unit - Cause De_Caster[(Integer A)] to damage circular area after 0.00 seconds of radius 700.00 at De_CasterLoc[De_TempInteger], dealing 3.00 damage of attack type Spells and damage type Normal
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_De_RandomPoint)
        Custom script:   call RemoveLocation(udg_De_RandomPoint2)
        Custom script:   call RemoveLocation(udg_De_RandomPoint3)

WC3ScrnShot_011708_102846_02copy.jpg


WC3ScrnShot_011708_102844_01copy.jpg


WC3ScrnShot_011708_102857_03copy.jpg

Hope you like it.

New version update! Now MPI!
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Damages everything? Well.. that can't be very nice :p
You need to destroy De_UnitGroup because it leaks. Move this
Set De_UnitGroup = (Units within 700.00 of De_CasterLoc matching (((Owner of (Matching unit)) is an enemy of (Owner of De_Caster)) Equal to True))

in the second trigger and in the end put call DestroyGroup(udg_DeUnitGroup)

EDIT: You don't need to set special effects into a variable and then destroy them. Just put Destroy (Last created special effect) after every effect and you're done! Like this:
Special Effect - Create a special effect at De_RandomPoint2 using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
Special Effect - Destroy (Last created special effect)
 

Vestras

Retired
Reaction score
249
Damages everything? Well.. that can't be very nice :p
You need to destroy De_UnitGroup because it leaks. Move this
Set De_UnitGroup = (Units within 700.00 of De_CasterLoc matching (((Owner of (Matching unit)) is an enemy of (Owner of De_Caster)) Equal to True))

in the second trigger and in the end put call DestroyGroup(udg_DeUnitGroup)

EDIT: You don't need to set special effects into a variable and then destroy them. Just put Destroy (Last created special effect) after every effect and you're done! Like this:
Special Effect - Create a special effect at De_RandomPoint2 using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
Special Effect - Destroy (Last created special effect)

They said it didn't leak.

in this thread
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Well, I guess you can leave it this way... Anyway, you can get rid of the SFX variables because they aren't needed ;)
 

Quauhtli

I have the right to remain silent.
Reaction score
62
Powerful is with one L. (just letting you know)

Exactly how does the caster get self damage? (I didn't find anything (just overlooked though) so).
 

Tom Jones

N/A
Reaction score
437
You know that the Unit - Damage Area damages everything, including allies. A better way is to pick all units in the region, and then use Unit - Damage Target on picked unit.
 

Quauhtli

I have the right to remain silent.
Reaction score
62
Well it's a Desperate Explosion, perhaps he wanted it that way?
 

0zaru

Learning vJASS ;)
Reaction score
60
Also sometimes is bugged. When I used it and test it with one Damage_Show_System then i saw that the damage was the half of the dmg that it was suppoused to deal.
 

Vestras

Retired
Reaction score
249
Also sometimes is bugged. When I used it and test it with one Damage_Show_System then i saw that the damage was the half of the dmg that it was suppoused to deal.

Woot? That is very wierd.. Why?

Tom Jones>

I know. I wanted it.

Quauhtli>

Unit - Set life of De_Caster to (Real(De_Integer))
 

Tom Jones

N/A
Reaction score
437
Use arrays for each of your variables, and use the player number of the owning player as index. You can change your periodic event to timer expires, and then use a timer for each player instead.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top