• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hidden units still bestow auras

Status
Not open for further replies.
Level 14
Joined
Oct 16, 2010
Messages
749
Hi,

So I've noticed that my hidden units seem to still be bestowing auras, I've had a look at other threads and couldn't find a strict solution

Is there any way of stopping this? Maybe disabling the ability or something?

Note the hidden units are also paused
 
Hi,

So I've noticed that my hidden units seem to still be bestowing auras, I've had a look at other threads and couldn't find a strict solution

Is there any way of stopping this? Maybe disabling the ability or something?

Note the hidden units are also paused
Does it have the Locust ability? Note that it makes the unit untargetable by pretty much everything
 
Level 23
Joined
Dec 4, 2007
Messages
1,559
At first i thought about changing their movement type to flying (flying units per default don't emit auras).
But i don't think this can be done?!
Then i looked into channel, which can be used to deactivate other abilities, sadly auras still work.

Next bet would probably to simply disable auras for the time of hiding.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,883
Here's a custom Show/Hide function that moves the unit to some out of reach part of the map while it's hidden:
Here's the GUI version:
  • CH Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set VariableSet CustomHide_Hash = (Last created hashtable)
      • -------- Set these X/Y coordinates to some out of reach part of the map: --------
      • Set VariableSet CustomHide_X = -3500.00
      • Set VariableSet CustomHide_Y = -3500.00
  • CH Show
    • Events
    • Conditions
    • Actions
      • Custom script: call SetUnitX(udg_CustomHide_Unit, LoadReal(udg_CustomHide_Hash, GetHandleId(udg_CustomHide_Unit), 0))
      • Custom script: call SetUnitY(udg_CustomHide_Unit, LoadReal(udg_CustomHide_Hash, GetHandleId(udg_CustomHide_Unit), 1))
      • Custom script: call FlushChildHashtable(udg_CustomHide_Hash, GetHandleId(udg_CustomHide_Unit))
      • Custom script: call ShowUnitShow(udg_CustomHide_Unit)
  • CH Hide
    • Events
    • Conditions
    • Actions
      • Custom script: call SaveReal(udg_CustomHide_Hash, GetHandleId(udg_CustomHide_Unit), 0, GetUnitX(udg_CustomHide_Unit))
      • Custom script: call SaveReal(udg_CustomHide_Hash, GetHandleId(udg_CustomHide_Unit), 1, GetUnitY(udg_CustomHide_Unit))
      • Custom script: call ShowUnitHide(udg_CustomHide_Unit)
      • Custom script: call SetUnitX(udg_CustomHide_Unit, udg_CustomHide_X)
      • Custom script: call SetUnitY(udg_CustomHide_Unit, udg_CustomHide_Y)
And here's how you use it:
  • Demo
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Paladin 0000 <gen> is hidden) Equal to False
        • Then - Actions
          • -------- Hide the unit of your choice: --------
          • Set VariableSet CustomHide_Unit = Paladin 0000 <gen>
          • Trigger - Run CH Hide <gen> (ignoring conditions)
        • Else - Actions
          • -------- Show the unit of your choice: --------
          • Set VariableSet CustomHide_Unit = Paladin 0000 <gen>
          • Trigger - Run CH Show <gen> (ignoring conditions)

And here's a lightweight Jass version:
vJASS:
globals
    // Set the X/Y values to some out of reach part of your map:
    real CustomHide_X = -3500.0
    real CustomHide_Y = -3500.0
    hashtable CustomHide_Hash = InitHashtable()
endglobals

function CustomHideUnit takes unit u, boolean flag returns nothing
    local integer id = GetHandleId(u)
    if flag then
        call SaveReal(CustomHide_Hash, id, 0, GetUnitX(u))
        call SaveReal(CustomHide_Hash, id, 1, GetUnitY(u))
        call ShowUnitHide(u)
        call SetUnitX(u, CustomHide_X)
        call SetUnitY(u, CustomHide_Y)
    else
        call SetUnitX(u, LoadReal(CustomHide_Hash, id, 0))
        call SetUnitY(u, LoadReal(CustomHide_Hash, id, 1))
        call FlushChildHashtable(CustomHide_Hash, id)
        call ShowUnitShow(u)
    endif
endfunction
Simply call CustomHideUnit() and pass a unit and whether you want to hide it (true) or show it (false).
 

Attachments

  • Custom Hide 1.w3m
    18 KB · Views: 9
Last edited:
Status
Not open for further replies.
Top