• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] Unable to load stunned unit into a zeppelin

Level 15
Joined
Sep 11, 2013
Messages
557
Greetings!

I just found that this "Load (Goblin Zeppelin)" Ability is not able to load stunned units and I wish that to be possible.



What are the easiest options to solve this problem?

The help will be appreciated!
:peasant-bowing:
 
Last edited:
I don't think there's any way to do this besides removing all Stun buffs from the unit you attempt to load. As far as I remember, the unit being loaded has to issue an Order to get inside and that's impossible if it's disabled.

Alternatively, you could try to create a custom loading/unloading system. Something like loading a Dummy unit instead of the real Hero, then manually Hiding/Unhiding/Repositioning the Hero as needed. Perhaps an illusion could be created instead of a Dummy. You'd just have to link it to the original Hero upon creation and track when it gets unloaded, that way you can remove it and unhide/position the Hero in it's place.
 
Last edited:
I don't think there's any way to do this besides removing all Stun buffs from the unit you attempt to load. As far as I remember, the unit being loaded has to issue an Order to get inside and that's impossible if it's disabled.

Alternatively, you could try to create a custom loading/unloading system. Something like using a Dummy unit to represent the Hero + manually Hiding/Unhiding. Perhaps an illusion could be created instead of a Dummy. You'd just have to link it to the original Hero upon creation, and track when it gets unloaded so that you can remove it and unhide/position the Hero in it's place.
Hi and Thanks for the help! :peasant-waving:

I ended up with a new ability and seems to be enough.
I did what you said with removing the stun buffs.

  • TEST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel Zeppelin XX
    • Actions
      • Set VariableSet TESTUNIT = (Target unit of ability being cast)
      • Game - Display to (All players) the text: test
      • Unit - Remove Stunned (Pause) buff from (Target unit of ability being cast)
      • Unit - Add Invulnerable (Neutral) to TESTUNIT
      • Wait 0.00 seconds
      • Unit - Order (Casting unit) to Load TESTUNIT
      • Unit - Remove Invulnerable (Neutral) from TESTUNIT
 
Keep in mind that the Wait isn't safe.

Never use (Casting unit) or a global variable after a Wait since they can be overwritten.
(Some exceptions apply depending on the Event Response / If you're smart about your variable usage, ie: Arrays and indexing)

Instead, use (Triggering unit) and local variables since they only exist within their own instance of the trigger:
  • TEST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel Zeppelin XX
    • Actions
      • Custom script: local unit udg_TESTUNIT = GetSpellTargetUnit()
      • Game - Display to (All players) the text: test
      • Unit - Remove Stunned (Pause) buff from TESTUNIT
      • Unit - Add Invulnerable (Neutral) to TESTUNIT
      • Wait 0.00 seconds
      • Unit - Order (Triggering unit) to Load TESTUNIT
      • Unit - Remove Invulnerable (Neutral) from TESTUNIT
      • Custom script: set udg_TESTUNIT = null
^ This is called shadowing, I turned your global variable into a local variable (within the scope of this trigger).

It's still not bug free since the Wait is unreliable, but it shouldn't be game breaking. I imagine worst case scenario the Zeppelin fails to load the unit.
 
Last edited:
Thank you very much, Uncle!
Now the wait is save to use because of this shadowing:?

If i delete the wait, the stunned unit will not load..
The best solution there is to use a 1 frame delay, which can be done by using a 0.00 second Timer. The issue is that local Timers aren't readily available in GUI so you'd have to take advantage of some more advanced concepts.

You could use one of the many systems available to ease this process for you:
It would be something like this, using two triggers:
1: On cast -> Remove Stun buff from target and make them invulnerable -> Start a 0.00 second timer
2: On timer expired -> Make target vulnerable and Load them into the zeppelin

Note that this isn't a bulletproof design, but the goal is to make it extremely unlikely that a problem arises.
 
Last edited:
The best solution there is to use a 1 frame delay, which can be done by using a 0.00 second Timer. The issue is that local Timers aren't readily available in GUI so you'd have to take advantage of some more advanced concepts.

You could use one of the many systems available to ease this process for you:
It would be something like this, using two triggers:
1: On cast -> Remove Stun buff from target and make them invulnerable -> Start a 0.00 second timer
2: On timer expired -> Make target vulnerable and Load them into the zeppelin

Note that this isn't a bulletproof design, but the goal is to make it extremely unlikely that a problem arises.
Oh, sorry, I didn't receive the notification of this last post. :peasant-sad:

After 2 hours of trying to understand what's going on with that GUI Timer System, I finally managed to finish the trigger.

Sadly, even with that timer, I encounter the same problem that appear with "the 0.00 seconds wait".

  • Load Stunned Unit In Leviathan 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel Leviathan ZZZ
    • Actions
      • Game - Display to (All players) the text: test123test
      • Set VariableSet ZamTimer_Target = (Target unit of ability being cast)
      • Unit - Add Invulnerable (Neutral) to ZamTimer_Target
      • Unit - Remove Stunned (Pause) buff from ZamTimer_Target
      • Set VariableSet ZamTimer_Duration = 0.00
      • Set VariableSet ZamTimer_Unit = (Triggering unit)
      • Set VariableSet ZamTimer_Player = (Owner of ZamTimer_Unit)
      • Set VariableSet ZamTimer_OnFinish = Load Stunned Unit In Leviathan 2 <gen>
      • Trigger - Run Create Timer <gen> (ignoring conditions)
  • Load Stunned Unit In Leviathan 2
    • Events
    • Conditions
    • Actions
      • Unit - Order ZamTimer_Unit to Load ZamTimer_Target
      • Unit - Remove Invulnerable (Neutral) from ZamTimer_Target
  • Load Stunned Units With Right Click
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Not equal to (Order(frostarmor))
      • (Unit-type of (Triggering unit)) Equal to Leviathan
      • ((Target unit of issued order) is A structure) Equal to False
      • ((Target unit of issued order) is A flying unit) Equal to False
      • ((Target unit of issued order) belongs to an enemy of (Triggering player).) Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • ((Target unit of issued order) has buff Stunned (Pause)) Equal to True
    • Actions
      • Game - Display to (All players) the text: zzzzz
      • Unit - Order (Triggering unit) to Undead Lich - Frost Armor (Target unit of issued order)
So, the problem appears when I try to load a unit that is heavily stunned by many missiles.
Somehow that happens because the load is not fast enough and because, for some unknown reason, the missile can proc the bash even if the target unit is invulnerable. <See this post>


Maybe you or someone else is able to solve this problem. :peasant-bowing:
I already spent 3 days trying to solve it, but without luck...

I attach the map with all my tests here.

Update:

I've made a lot of tests, and this trigger seems to work perfectly now. This "Wait" seems to be better than Timer.
Somehow sometimes the timer trigger just refuses to load the unit into the transporter.
  • FIRST TRY UNUSED
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel Leviathan ZZZ
    • Actions
      • Custom script: local unit udg_LoadUnitInLeviathan = GetSpellTargetUnit()
      • Game - Display to (All players) the text: 654
      • Unit - Hide LoadUnitInLeviathan
      • Unit - Remove Stunned (Pause) buff from LoadUnitInLeviathan
      • Set VariableSet LoadUnitInLeviathanPointVar = (Position of (Triggering unit))
      • Unit - Move LoadUnitInLeviathan instantly to LoadUnitInLeviathanPointVar
      • Wait 0.00 seconds
      • Unit - Unhide LoadUnitInLeviathan
      • Unit - Order (Triggering unit) to Load LoadUnitInLeviathan
      • Custom script: call RemoveLocation(udg_LoadUnitInLeviathanPointVar)
      • Custom script: set udg_LoadUnitInLeviathan = null
That "Move" fixes a visual bug that appears with Hide/Unhide.

Thank you so much for all your outstanding help!
:peasant-victory::peasant-cheers-back::peasant-ok-hand:
 

Attachments

Last edited:
Back
Top