1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Exploding a Dead Unit, Possible?

Discussion in 'Triggers & Scripts' started by -Berz-, Jul 17, 2009.

  1. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    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
     
  2. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,022
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    like incinerate?
     
  3. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Yeah, like that ^^

    Some sort of it, but triggered.
     
  4. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    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.
     
  5. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Yeah, that's why I'm asking, I've tried everything :<
     
  6. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,022
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    hmm

    once the unit dies, you can revive it with a dummy then explode that unit.
     
  7. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    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: Jul 17, 2009
  8. Ciebron

    Ciebron

    Joined:
    Apr 6, 2008
    Messages:
    760
    Resources:
    2
    Spells:
    2
    Resources:
    2
    this is how Explode Unit works
    Code (vJASS):

    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 !
    You could Pick dead units and create a Effect on thier location
     
    Last edited: Jul 18, 2009
  9. Cokemonkey11

    Cokemonkey11

    Wurst Reviewer

    Joined:
    May 9, 2006
    Messages:
    3,269
    Resources:
    18
    Tools:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    2
    JASS:
    7
    Resources:
    18
    His question was regarding bounty from exploded units. He already knew how to make them explode.
     
  10. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Thanks guys, it's a useful info. Thou I've figured it out a few hours ago :p
     
  11. M4stah

    M4stah

    Joined:
    Feb 16, 2009
    Messages:
    711
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Isn't there a action in GUI to make a unit explode on death?
     
  12. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Damn, I'm stupid :<

    Ofcourse we do ^^

    Retarded me...

    Anyway, I had to do it with replacing units, because it checks if it's a hero...and gets a location for futher use. I would have to do it the same :>
     
  13. FriXionX

    FriXionX

    Joined:
    Aug 1, 2008
    Messages:
    401
    Resources:
    0
    Resources:
    0
    Wait... cant you just trigger a spell based off of animate dead?...
     
  14. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Nope :D

    It's a bit complicated to tell how the whole spell works :p

    It's like unit group in unit group + AoE damage + explosion... xP
     
  15. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,022
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    Kaboom ability is explosion on death that will give bounty.
     
  16. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Thanks Just Spectating for tying to help but....

    This can be marked as solved :D
     
  17. dimitri231

    dimitri231

    Joined:
    Aug 4, 2008
    Messages:
    265
    Resources:
    0
    Resources:
    0
    I have one Idea, set the custom value of the unit as the gold dropped.Then do Add CustomValue of triggering unit to the attacking unit.then explode
    =)
     
  18. Slaydon

    Slaydon

    Joined:
    Jan 6, 2008
    Messages:
    2,432
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    a unit dies, equal to your unit, revive your unit, explode, kaboom, done
     
  19. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    Must I say again that this is solved? :<

    Thou, thanks for trying to help ^^
     
  20. Slaydon

    Slaydon

    Joined:
    Jan 6, 2008
    Messages:
    2,432
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    ohh, didnt mind reading all comments so :d