HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hidden Death Heroes

12-30-2005, 05:36 PM#1
Blade.dk
First I'll state that I don't think this has been discovered before, but if it has, I apologize for this, then, unneeded post.

Anyways, I was speaking with Daelin and he told me about a weird check in the following bj function:

Collapse JASS:
function ShowUnitShow takes unit whichUnit returns nothing
    // Prevent dead heroes from being unhidden.    
    if (IsUnitType(whichUnit, UNIT_TYPE_HERO) and IsUnitDeadBJ(whichUnit)) then
        return
    endif     

    call ShowUnit(whichUnit, true)
endfunction



It ensures that the function won't show dead heroes, so we started wondering if heroes actually are hidden by the game upon death.

We tested it, and it showed that they ARE hidden AND moved to a place outside the map bounds.

I'm attaching a small map that shows this, the hero is killed and after some time he is moved to the player's start location and showed.

As you can see, he shows up in the last position of his dissipation animation.

EDIT: I'm not sure if this is the correct forum, but it was the one I thought that it fitted best into, since it isn't a trigger/JASS related discovery, it was just the function that gave us a hint about it. Please move it if I'm wrong.
Attached Files
File type: w3mhiddenheroestest.w3m (16.3 KB)
12-30-2005, 06:42 PM#2
Panto
It's a neat discovery. I'm not sure it's terribly useful, unless you wanted a ToB-style hero death where they lie around waiting to be resurrected.

In a way, it's a little silly. You'd expect Blizzard to actually have an independent system for dealing with hero death, since it's a rather important and frequent aspect of the game, even in melee.
12-30-2005, 06:52 PM#3
Blade.dk
Quote:
Originally Posted by Panto
It's a neat discovery. I'm not sure it's terribly useful, unless you wanted a ToB-style hero death where they lie around waiting to be resurrected.

In a way, it's a little silly. You'd expect Blizzard to actually have an independent system for dealing with hero death, since it's a rather important and frequent aspect of the game, even in melee.

Agreed. I don't think it's useful at all, but I've never had the check in my JASS functions before, I've used the native directly, so if it should bug out for someone, this could be useful to know.
12-30-2005, 07:47 PM#4
Murder1833
I'm bout to check it out now. Sounds odd. Yeah, why would blizzard just... i dunno deal with it how they did. Hiding a body... what, is the murder of a hero a crime? Is the killer and convict, so blizzard had to make the killer hide the hero's body or sumthing?

Zoom (requires log in)
Attached Images
File type: jpghidehero.JPG (79.8 KB)
12-30-2005, 07:53 PM#5
absolutezero
lol, maybe.

It might have something to do with how I never see a dissapate animation on the last RoC Orc campaign level.

That is, if you were to kill Grom Hellscream for fun instead of capturing him, he doesn't dissapate, he just reappears back at the throne.
12-30-2005, 08:46 PM#6
Taur
uh no absolute zero, he revives so fast that you don't see the dissiptation animation.

Actually blade this might be useful, will play animations still work on it?
12-30-2005, 08:58 PM#7
Blade.dk
Haven't tested that. I should do it later, unless you'll do it yourself ^^.
12-30-2005, 09:41 PM#8
Tim.
Also, someone should test this out with normal units.
12-30-2005, 09:52 PM#9
shadow1500
knew about it long ago, i scanned common.j and blizzard.j several times while bored in school, anyway, u can also change "Decay time - Hero Dissipation" in gameplay constants, if the hero doesnt have a dissipate animation then he will just lay on the ground for that time.

Quote:
will play animations still work on it?
dead units can play animations i think

Quote:
Also, someone should test this out with normal units.
normal units are cleared from memory after they decay/die, there is no need to keep them there since they cant be revived like heroes.