[Trigger] Pause Unit without Pause Command (aka: bizarre pause+stun bug)

Status
Not open for further replies.
Level 14
Joined
Jul 15, 2005
Messages
352
I've recently discovered a really bizarre bug with Warcraft III and the World Editor. I haven't seen it mentioned anywhere else, so I'll explain it first.

It seems that if a unit is Paused (using the usual 'pause' GUI trigger Action) but is at the very same moment also stunned by a stun-causing ability (eg, Storm Bolt, War Stomp, or any similar abilities or custom abilities derived from them), it completely and permanently immobilizes/paralyzes the target unit - that is to say, the target unit remains stunned/paused forever, unable to move, attack, or do anything else. They're basically doomed at this point.

The stun, which normally has a limited duration, remains forever. I've tried manually removing the stun buff (via a trigger), but the unit remains immobilized. The 'pause' effect also cannot be removed - using the 'unpause' command has no effect. Even removing both the stun buff and unpausing does nothing. It seems it's an irrevocable condition.

Which brings me to my questions:

1. Is there a way of completely removing a player's ability to give commands to a single unit for a limited amount of time WITHOUT using the pause function?

And:

2. If not, does anyone know anything about this bug, and/or a way to bypass it?
 
based on my experience almost any timed buff that is applied to a unit, stops when paused (stun, slow, timed life, etc), but once you unpause him it resumes...

example: a 1 second stun... if the unit is paused then stunned, the stun wont get removed, then after the unit is unpaused, the stun goes off after 1 second...

this is what I experienced when dealing with buffs and pause... so your case is a pretty wierd bug...

so could you upload the map where this happens?
 
Level 14
Joined
Jul 15, 2005
Messages
352
Ok, here we go, I made a test map where the problem is reproducable. My original test map which I used for testing the problem has a million triggers, custom skins etc and so is a bit too bloated to upload.

To reproduce the bug, just run the map, then keep clicking on the Footman's Berserk ability. The bug doesn't always kick in - it usually takes around 3 tries before it happens.

Note that I've got some 'useless' triggers in the map not directly related to the stunning/pausing functions, but that apparently are somehow related to the bug occurring.

One is a periodic trigger (that effectively does nothing) and one that removes the invisible caster. These are based on the fact that my actual maps (they're single-player only) DO have a few periodic triggers (with that sort of structure), and do have triggers for removing various invisible casters/special effects.

I've noticed that if you remove these 'useless' triggers from the test map, the stun/pause bug doesn't occur. That, and the fact that the bug doesn't consistently occur every time, makes me think that the extra milliseconds needed for executing some of those other triggers might be in some way interfering with the interaction between the stun and pause effects.
 

Attachments

  • StunTest.w3x
    19.3 KB · Views: 143
Level 14
Joined
Jul 15, 2005
Messages
352
Give the unit an ability based on Channel. Set follow through time to whatever you want the duration to be, and maybe adjust the animation. Make sure Options - visible is false. Make sure Disable other abilities is true. Order the unit to use the ability.

If I do this though, won't being stunned interrupt the Channeling and thus possibly cause the period that the unit is 'paused' to end early?
 
Level 14
Joined
Jul 15, 2005
Messages
352

Interesting, that does seem to work.... but why? It's not the 'remove unit' instruction that's the problem - it seems to be the "Unit Enters (Entire Map)" event (I know, because I tried adding an expiration timer instead of a 'remove unit' instructions to the "Unit Enters (Entire Map)" event, and it still had the problem).

I suspect I've seen the stun/pause bug occur in cases where the cause wasn't an invisible caster - for example, it was a standard unit using a projectile spell based on storm bolt. This means that changing the way that invisible casters are removed might not actually resolve the issue. Plus my maps have many other triggers that use the "Unit Enters (Entire Map)" event, so I'm not sure it's a good idea (or even possible) to remove them all (plus it would be a nightmarish amount of work).

I still think the easiest solution would be to find an alternative to using the pause trigger function - there's only two triggers that involve 'pausing' units in all my maps, so replacing those with something less problematic would be way easier than changing the many, many triggers that in some way involve eye-candy 'units' or invisible casters, and it would be far less likely to screw up anything else in the maps.
 
Level 14
Joined
Jul 15, 2005
Messages
352
I changed the conditions of pausing and the events only and it seem to work.

The really odd thing though is that if we remove the 'unit removing' trigger ONLY, or change the event that initiates the pause/stun ONLY, it doesn't fix the bug. It's only when we do both that it fixes it. That makes me suspect that the problem isn't so much inherent in a specific function being called, but rather in how Warcraft III handles pauses/stuns. Very minor changes in timings of the triggers firing (such as those that we introduce by the above changes) may mean that the problem can't occur under the test conditions we have, but could still occur in the map itself where there's a lot of triggers firing (thus introducing the bug again under those hard-to-reproduce circumstances).

I still think the only safe way to avoid the bug is to avoid using the Pause function...
 
Level 14
Joined
Jul 15, 2005
Messages
352
Whoa, the plot thickens.

I just tried, for interest's sake, to replace the pause function with 'channel'.

Turns out that the bug is still there, even though now the 'pause' function is never being called! This is pretty major, and makes troubleshooting a LOT harder.

I think at this point the easiest solution instead will be if we can find a way to get the 'frozen' unit moving again. Unfortunately I have no idea if that's even possible. I rather think it's not, as nothing I've tried has worked.

I've attached the map again for anyone wanting to take a look.

EDIT: Further tests show that the problem does NOT occur when I change the Channel ability so that it doesn't disable other abilities. This makes me think that the problem arises when either pausing or channeling removes a characters icons/abilities, and the character gets stunned at the same time - somehow, this makes the game 'forget' all the character's icons/abilites and prevents them from ever being reinstated.

Now I'm starting to think that the best solution might be to use a dummy unit that induces a stun in the unit that needs to be paused, rather than using 'pause' or the 'channel' ability. This is because stuns don't remove the icons, but do prevent the unit from acting in any way (and they can't be dispelled)...
 

Attachments

  • StunTest.w3x
    19.5 KB · Views: 123
Last edited:
Level 14
Joined
Jul 15, 2005
Messages
352
stun can be purged right?

anyway, that's the best thing you could do if the bug still exists using the other methods...

I don't think stun can be dispelled (purged?) unless it's manually removed with a trigger. Using a Dispel Magic spell on someone with stun on them doesn't remove the debuff - I think it doesn't count as 'magical'. So it's actually a perfect (if roundabout) solution. I've done some preliminary testing with it and it seems to work thus far.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
I'm not exactly sure why this occurs but I have a feeling it's because you're using Berserk. If you change the ability to something like Roar, I don't think you should encounter it.

If it's still bugging then I think you should just stick with stunning the unit.
 

Attachments

  • StunTest.w3x
    18.9 KB · Views: 119
I don't think stun can be dispelled (purged?) unless it's manually removed with a trigger. Using a Dispel Magic spell on someone with stun on them doesn't remove the debuff - I think it doesn't count as 'magical'. So it's actually a perfect (if roundabout) solution. I've done some preliminary testing with it and it seems to work thus far.

ahh... okay... not dispel magic, the ability purge... better to try it too...
 
Level 14
Joined
Jul 15, 2005
Messages
352
Using a stun from a dummy unit seems to be working quite well for me, so that's what I'm currently going for. It would be interesting to investigate further and see if the Berserk ability is somehow to blame, but since I've already started on implementing the stun-based bugfix, I think I'll leave it for now.

Thank you everyone for the help and advice!
 
Status
Not open for further replies.
Top