HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

intersting bug when an unit is pause ( by a spell or PauseUnit() )

05-04-2007, 03:12 PM#1
Troll-Brain
When an unit is paused with the fonction
Collapse JASS:
PauseUnit
, it get an point target order.
The point is null.


When an unit is paused by a spell, it get an widget target order.
The widget is null

The IssuedOrderId() == 851973

But when the unit get the order she hasn't the buff of the spell yet

I didn't try with all spells but it works with :
- 'AHbh'
- 'AHtb'
- 'Asta'

Maybe you already know this bug ...
05-05-2007, 06:06 AM#2
Pyrogasm
I'm sorry, but I don't understand what it is you're saying.

This may have something to do with it: when a unit is paused, it keeps its current order.
05-05-2007, 07:34 AM#3
Troll-Brain
ok i will say it in jass :

when an unit is being to paused by the action Pause unit, she get an order :
Collapse JASS:
constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER       = ConvertPlayerUnitEvent(39)
or
Collapse JASS:
constant unitevent EVENT_UNIT_ISSUED_POINT_ORDER                    = ConvertUnitEvent(76)

and

Collapse JASS:
GetIssuedOrderId () == 851973
GetOrderPointLoc () == null



when an unit is being to paused / stun by an ability she get an order :

Collapse JASS:
constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER      = ConvertPlayerUnitEvent(40)
or
Collapse JASS:
constant unitevent EVENT_UNIT_ISSUED_TARGET_ORDER                   = ConvertUnitEvent(77)

and

Collapse JASS:
GetIssuedOrderId () == 851973
GetOrderTarget () == null

So there is a way to know when an unit is paused by a spell if you want to trigger this spell.
And of course don't forget the bugs if you use this twice events

like that :

Collapse JASS:
function AntiBugPause takes nothing returns boolean

    return  GetIssuedOrderId() != 851973
       
endfunction

Collapse JASS:
call TriggerAddCondition( yourTrigger, Condition( AntiBugPause ) )
05-05-2007, 11:22 AM#4
Anitarf
Actualy, from my experiments, when a unit is stunned by a spell, the target order that is issued to the unit does not target null, but the caster of that spell.

Sadly, one cannot use this method to easily detect stun spells, or, what would be even more useful, bash. As long as a unit is already paused/stunned, it can not receive orders, so, for example, casting storm bolt on a unit that's stunned by bash will not trigger the order event.
05-05-2007, 11:47 AM#5
Troll-Brain
yes that's true.

And the point is'nt null it is the center of the map (0,0)
05-05-2007, 12:19 PM#6
Toadcop
=) im know something better ;) if unit begins effect of Methamorphose (for example) and if in this moment to pause unit then this unit will be pause forever =) !!! and also it seems to work on stun effects to... and alot of other effects... so PauseUnit() in spells is eXtreme evil ! =)
// yes for example i use Avatar and by transforming some spell will pause this unit for 0.5 sec for example and you can tell bye bye to this unit =) it will be "Frozen" (Dogzilla rules :D )
// check it ;)
05-05-2007, 12:54 PM#7
MaD[Lion]
what u mean by pause forever?, cant u hide/unhide to fix this?
05-05-2007, 02:00 PM#8
Troll-Brain
Can you show an example of a trigger ?
Witch event ?
05-05-2007, 03:19 PM#9
Toadcop
Hoho O_o ?! strange... now i can't simulate this... BUT ! i have found more interesting thing ! If unit is morphing and you will pause it, the pause action will be puted into a queue and only acomplished than the morphing "landing time" or something like this will be done ! but in my older cases it has pause units immediately !!! so the above described situation have happened and unit still pause forever ! i think it's related to some gameplay constants...
// but how i see by default it's not the problem
// here the example so you can see what unit's are paused only the "landing time" (the change duration) i have setted it to 4 sec so you can see it... btw select Demon Hunter to see it. and also i pause Demon Hunter after 0.01 seconds after he use Metamorphosis ! (so theoreticaly he must be paused almost immediately after 0.01 sec.)
so potential PauseUnit can be dangerous ! =)
Attached Files
File type: w3xtestmap.w3x (13.3 KB)