[Import] Move / lose control bug

Status
Not open for further replies.
Level 1
Joined
Jan 1, 2015
Messages
3
Hey everyone,

I´m currently working on a version of 'Footmen Frenzy' however i´ve got some issues with players losing control over their units...

I´ve tested the map locally and never had any issues with it, however once the map is uploaded to a bot and played with multiple players it starts having its problems...

I´ve googled various options but couldn´t really find anything useful :(
This thread from another forum describes a similar / same problem, however what they´re describing as the cause isn´t even existent in my map :O
http://www.wc3c.net/showthread.php?t=107879

Let me know if you want to have a look at the map & i´ll upload it to my dropbox acc & share the link.

Any help will be much appreciated - been looking though my triggers trying to find something that could potentially cause it for hours now... :S
 
Level 14
Joined
Oct 18, 2013
Messages
724
Did you read all of it. I'm actually REALLY glad you posted this, because I had the same problem with one of my heroes. The part that was relevant for me was the post stating that pausing a unit after a spellcast. If you pause a unit for a spell, put a 0.01 wait ;3 I think.. If I interpreted this comment correctly:


"You can reproduce it by issuing a berserk order and then pausing the unit in the spell effect callback. When you try to unpause the unit, the unit's command card will be empty and the unit will no longer respond to any orders. There is no solution to this without recreating the unit, as I had to fight with hundreds of possible fixes when this happened for bosses in OD. It can also be reproduced numerous other ways, all from orders/instant spells and then pausing the unit. A short delay will fix it. The reason spells like roar work is because they have infinitesimally small cast delays.

That's really all there is to it. There's no fix without recreating the unit, just don't incite the bug and you're fine.

--------------------------------------------------------

The bug being presented in the first post is a different bug than that one I described above, however. You can incite the bug in the first post by doing something similar with spells that preserve orders. For instance, take a roar based ability and cast it, then in the SPELL_EFFECT callback pause the unit and unpause the unit later. Your unit will now, no matter what, carry out the previous order it had and ignore all further orders until the current order is completed. This can be reproduced numerous ways, including those presented in the first post with morphs.

The fix is to issue the stop order before pausing the unit and then reissue the unit's last order *cough* when you unpause the unit. Fixes the bug right as rain. Again, this is a bug you cannot "fix" without recreating the unit, but that you can avert with proper coding before it happens.

--------------------------------------------------------

The difference between these two bugs seems to be in the circumstances that bring them to existence. The first bug where the command card vanishes is mostly caused by instant-cast abilities like berserk or orders. The second bug where the unit just "retains" its current order and doesn't do anything else until the order is completed originates mostly from morph abilities and abilities with cast times.

EDIT:
Doing some tests where I ran into the bug in my maps, I also managed to recreate the second bug with berserk. It also appears that moving the paused unit via triggers once its paused after the berserk cast causes the first bug. There may be other natives that do the same thing, though. Safe bet is to just delay pauses to the caster by 0.001 and neither bug seems to ever happen."

So make sure you dont have any instant "Pause after cast" spells. ^^
 
Level 1
Joined
Jan 1, 2015
Messages
3
thanks for your reply, however i don´t pause any unit in the entire script...
in fact at the point where the bug appears there´s none of the triggers that look for a spell have been active.
 
Level 14
Joined
Oct 18, 2013
Messages
724
Hmmm. Another issue could be the amount of units on the map? War3 gets to a point where it cant process unit commands if there are too many units on your map. That's the only thing I can think of, though I'm likely overlooking something.
 
Level 1
Joined
Jan 1, 2015
Messages
3
well... there aren´t that many on the map... also whenever i test via computer - even with 11 computer players = more units the bug doesn´t happen
 
Status
Not open for further replies.
Top