HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What event does EVENT_UNIT_HIDDEN respond to?

02-03-2009, 06:12 AM#1
chobibo
Does anyone know what event this fires? I tried hiding a unit via ShowUnit native but it seems that it doesn't work. Thanks for any help.
02-03-2009, 07:42 AM#2
DioD
never saw map using this.

(i take anything i like from maps, but looks like no map uses this, just like unsafe variable event)

also there is reverse detected event.
02-03-2009, 03:11 PM#3
chobibo
Maybe this is an unimplemented code?
02-03-2009, 06:53 PM#4
Valdez
Maybe its for when a specific unit becomes invisible?
02-03-2009, 08:28 PM#5
chobibo
I tried it on Blademaster's windwalk and it doesn't fire.
02-03-2009, 08:41 PM#6
Fledermaus
Tried Shadowmeld?
02-03-2009, 09:01 PM#7
Archmage Owenalacaster
I've tried both. Neither fires.

EDIT: In response to Valdez, common.j has constants EVENT_PLAYER_UNIT_HIDDEN and EVENT_UNIT_HIDDEN; it can be either a specific unit or not.
02-03-2009, 11:52 PM#8
TEC_Ghost
I just did a fuck ton of tests, couldn't get anything either.
02-04-2009, 01:57 AM#9
Vexorian
Take a look at the part in which it is declared:

Collapse JASS:

    constant playerunitevent EVENT_PLAYER_UNIT_ATTACKED                 = ConvertPlayerUnitEvent(18)
    constant playerunitevent EVENT_PLAYER_UNIT_RESCUED                  = ConvertPlayerUnitEvent(19)

    constant playerunitevent EVENT_PLAYER_UNIT_DEATH                    = ConvertPlayerUnitEvent(20)
    constant playerunitevent EVENT_PLAYER_UNIT_DECAY                    = ConvertPlayerUnitEvent(21)

    constant playerunitevent EVENT_PLAYER_UNIT_DETECTED                 = ConvertPlayerUnitEvent(22)
    constant playerunitevent EVENT_PLAYER_UNIT_HIDDEN                   = ConvertPlayerUnitEvent(23)

    constant playerunitevent EVENT_PLAYER_UNIT_SELECTED                 = ConvertPlayerUnitEvent(24)
    constant playerunitevent EVENT_PLAYER_UNIT_DESELECTED               = ConvertPlayerUnitEvent(25)
Notice the spacing. 100% sure it has something to do with DETECTED but the question is, what does DETECTED do?

Edit: If this was left over code, there would be a comment about such thing. Like //for compat or something.
02-04-2009, 09:12 AM#10
DioD
Unit can be detected by other units, neutral creeps may be.

Also there is Expansion event, soo it can be used for burrowed units.

as i said: there is no maps using this event.
02-04-2009, 01:55 PM#11
Archmage Owenalacaster
I tested burrowing, invisibility, shadowmeld, wind walk, entering transport cargo, locust, and hiding units with triggers. I didn't test gold mines, or entering the fog of war with 0 sight range.
02-04-2009, 06:50 PM#12
Valdez
Well given Vexs post I would say maybe it has to do something with the Magic Sentry ability being able to detect invisible units but I could be wrong.

IE: A tower sees an Invis unit but does not attack it thus breaking its invisibility and so if the invisible unit moves away maybe that would count as becoming hidden again??
02-05-2009, 06:16 AM#13
saw792
I tested magic sentry. It doesn't fire HIDDEN or DETECTED with an enemy invis unit moving in and out of it's range.
02-05-2009, 07:03 AM#14
PandaMine
According to pyrogasm, the event is fired when you use the function call HideUnit(MyUnit, true)
cbf testing it now, but it would make sense
02-05-2009, 07:09 AM#15
Archmage Owenalacaster
Quote:
Originally Posted by PandaMine
According to pyrogasm, the event is fired when you use the function call HideUnit(MyUnit, true)
cbf testing it now, but it would make sense
No such function. Bj ShowUnitHide(unit) and native ShowUnit(unit,false) are your options, sir.