• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Exploding a Dead Unit, Possible?

Status
Not open for further replies.
Level 37
Joined
Mar 5, 2008
Messages
3,887
Hello dear Hivers :D

Yet again I have a problem...

As we know you can explode a living unit... the problem is that you don't gain gold from doing that.

So is there a way to explode a dead unit (Let's say that we damage it first so it's dead and right after that we explode it)

Or if it's there any other way?

Thanks!

~Berz
 
Nah, that one happens with a trigger of type:
Events
Unit - A unit dies
Conditions
Actions
Set Point1 = (Position of (Dying unit))
Unit - Cause (Triggering unit) to damage Point1 bla bla
Custom script: call RemoveLocation (udg_Point1)

Dead units can't explode; i mean picking every unit matching (Matching unit) is dead Equal to True, and then Unit - Explode it, it will not work.
 
Level 37
Joined
Mar 5, 2008
Messages
3,887
Hmm... I'll try that out.

But wait... dead units can get removed from the game right? If so I can just make a special effect and remove the unit.

Edit:

I've made it pretty simple, once unit takes the damage, it dies and you get the gold you just remove it and create special effect, looks the same as if exploding it :D

Still, thanks guys ^^

~Berz
 
Last edited:
Level 11
Joined
Apr 6, 2008
Messages
760
this is how Explode Unit works
JASS:
function ExplodeUnitBJ takes unit whichUnit returns nothing
    call SetUnitExploded(whichUnit, true)
    call KillUnit(whichUnit)
endfunction

  • Custom script: call SetUnitExploded(whichUnit, true) //this makes the unit explode when it dies
  • Unit - Cause (Unit) to damage (Unit), dealing 100000000.00 damage of attack type Spells and damage type Normal //just some crazy amout of damage so it dies
Learn jass instead !
Dead units can't explode; i mean picking every unit matching (Matching unit) is dead Equal to True, and then Unit - Explode it, it will not work.

You could Pick dead units and create a Effect on thier location
 
Last edited:
Status
Not open for further replies.
Top