• 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.

Help Fixing trigger leaks/hero locking up bug. Money reward offered.

Status
Not open for further replies.
Level 2
Joined
Apr 9, 2020
Messages
13
I've been working on this map with the community and am stuck on an issue. Occasionally player's heroes will freeze up. By that I mean they can move, but cannot take abilities, use abilities, or buy items. Sometimes the effect is temporary. I have noticed twice it has occurred when a hero levels up, but that could just be the first time they try and select the next level of an ability so they had not noticed it before. It doesn't effect everyone on the map, but usually 1 to 2 players and not a specific color.

Additionally, I would like help fixing leaking triggers. I have been trying to figure out how, but know I have not solved many of my leaks.

Lastly, I haven't been able to get consumable items to stack upon buying from a shop when inventory is full. If I could have help with that it would be greatly appreciated.

I know that fixing all of this may take a significant amount of time and am therefore willing to provide minor compensation (Venmo $20?) if I can test the map and find these issues have been fixed.
 

Attachments

  • Battle Ships Pro V1.36e.w3x
    12.6 MB · Views: 68

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
After a quick glance through the triggers... Oh boy, that's a lot.

1) A lot of Point, Unit Group, and Player Group leaks
2) You use the "A unit begins casting an ability" event a lot when you should probably be using the "A unit starts the effect of an ability" event instead. In a lot of cases begins casting can be cancelled and the trigger will still run.
3) Your custom abilities that use Dummy units seem to be all wrong. You're hiding the Dummy unit and then trying to get it to cast a spell, hidden units cannot cast spells. Dummy units are supposed to have the Locust ability, this is what makes them unselectable, then you order the Dummy to cast a spell with triggers.
4) A lot of redundant variables. You can apply the same logic you use for your PlayerShip[] variable for pretty much every case where you do something like "Player3Ship", "Player4Ship", etc... saving yourself many variables.

Unfortunately, I couldn't figure out what was causing the freezing (pausing?) issue, but I'd say remove any instances of Pause/Unpause unit from the map. You can keep using Pause All Units for things like pausing units at the end of the game since the game is over anyway.
 
Last edited:
Level 2
Joined
Apr 9, 2020
Messages
13
After a quick glance through the triggers... Oh boy, that's a lot.

1) A lot of Point, Unit Group, and Player Group leaks
2) You use the "A unit begins casting an ability" event a lot when you should probably be using the "A unit starts the effect of an ability" event instead. In a lot of cases begins casting can be cancelled and the trigger will still run.
3) Your custom abilities that use Dummy units seem to be all wrong. You're hiding the Dummy unit and then trying to get it to cast a spell, hidden units cannot cast spells. Dummy units are supposed to have the Locust ability, this is what makes them unselectable, then you order the Dummy to cast a spell with triggers.
4) A lot of redundant variables. You can apply the same logic you use for your PlayerShip[] variable for pretty much every case where you do something like "Player3Ship", "Player4Ship", etc... saving yourself many variables.

Unfortunately, I couldn't figure out what was causing the freezing (pausing?) issue, but I'd say remove any instances of Pause/Unpause unit from the map. You can keep using Pause All Units for things like pausing units at the end of the game since the game is over anyway.


Thanks for taking a look Uncle, that's very helpful. Would you be able to help stop the leaks and optimize the map? I know it's a lot. I could reimburse you $20 for your time. Also, the map is currently being edited and saved through the latest version of reforged. I started it with the classic warcraft 3's world editor though. I also made a few minor updates, so I am attaching the latest version of the map. Let me know if you're up for it. Thanks again.
 

Attachments

  • Battle Ships Pro V1.36f.w3x
    12.6 MB · Views: 25
Status
Not open for further replies.
Top