• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Abilities lock up and sometimes units freeze

Status
Not open for further replies.
Level 2
Joined
Apr 9, 2020
Messages
13
Hello,

I really need some help with an issue on this map I'm working with a community of people to edit. The issue is sometimes a hero will freeze up at random. I haven't found a common theme to a specific ability or item use. Different heroes can experience it. Different items sets on those heroes can experience it. I added a -debug command which should trigger a unit to unpause, but that didn't help either. This is my first time making triggers, so I could really use some help. I have uploaded the map below.
 

Attachments

  • TriggerHelp.w3x
    12.6 MB · Views: 16
Level 14
Joined
Feb 7, 2020
Messages
387
I would investigate the following triggers using wait steps that pause PlayerBoat[] after doing a quick scrub of the map script:

Change Ship
Mode Vote Done Check
Start Repair North
Start Repair South

I think someone else can chime in here, but I'm not sure how bad it is to use
  • Wait until ((Percentage life of (Triggering unit)) Greater than or equal to 99.99), checking every 1.00 seconds
I couldn't find other threads on it.

Knowing how polled waits work in the engine by default, this is probably dangerous and could even be causing the problem. Wait steps aren't reliable because they don't preserve the GetLast() architecture of the stack. As far as I'm aware, only GetTriggerUnit()--aka Get Triggering Unit in GUI--is kept past wait steps. This means if you do something like Get Last Replaced Unit after a 15 sec wait, it's not going to get the last unit in that trigger that was replaced if another trigger also replaced a unit. It's because most of these GetLast() functions essentially use recycled variables (so they have to be called in order).

An aside: you're leaking all over the place. Should probably check out Complete list of things that leak
 
Level 2
Joined
Apr 9, 2020
Messages
13
Planetary,

Thank you so much for taking a look at the triggers. I really appreciate it. I'll look into the comments you made and will try to do an alternative to the Wait until trigger.
 
Level 2
Joined
Apr 9, 2020
Messages
13
I'm still experiencing a strange issue that locks up all but the hero's ability to move. Occasionally, a hero will be unable to cast abilities, use items, buy items, or select a leveled up ability. It doesn't apply to every hero on the map, just some unlucky person(s). I've removed all pausing triggers from the map, but the issue persists. I've put a lot of work so far into this map, but if I can't fix this issue it won't be playable. If anyone could help it would be greatly appreciated. It's a difficult bug to find. I have attached the map below. (also, I am working on fixing the leaks, but don't think leaking is causing the issue?)
 

Attachments

  • Battle Ships Pro V1.35d.w3x
    12.6 MB · Views: 15
Status
Not open for further replies.
Top