• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Issue relating to group triggers (Guessing)

Status
Not open for further replies.
Level 1
Joined
Aug 18, 2017
Messages
2
Intro
Hello. I've been working on a custom map for a long arse time now and have either run into or found a bug that is causing all sorts of issues for my project. Its essentially a massive race mod :croll:, made of 100's of models/textures/icons from here and other places. I'd like to think it goes a bit beyond the usual, as currently it has 17 full races with more partially working. Anyways, all the trigger work for features/spells/whatever has been done in GUI and I have no actual previous experience or 'coding' knowledge so I know there are bugs, leaks, etc. Slowly taking them out as I go, or trying to at the very least.

The Issue
A newly created unit group trigger causes all units to stop normal function. Its not lag, the units either wont build with the game stating that the new unit doesn't have room to be created or already created units cant move more then a few tiles before being seemingly locked into place. Its as if the entire map has been covered with pathing blockers. Also, if the issue is present, the game locks up when exiting.

Fixing it is as simple as disabling the new unit group trigger, bear in mind it can be the new group trigger or an old one, either will get the map working again. I have also isolated two other triggers part of a larger income system that if disabled will make the map function again, this is with the the group trigger active.

I noticed that if a builder unit is selected and a structure is selected to be built that the green pathing preview for the structure shows tiny red grid section's instead of the usual sized ones that would appear if something is blocking construction. These tiny red squares appear randomly over the entire map.

Pic Related:

Issue1.png

Ideas on why
I'm hoping someone here can point me in the right direction. I did a bunch of scouring the web looking for answers, unfortunately I didn't find anything quite right to what I was experiencing. Its also possible I simply didn't look hard enough.Is it leaks, corruption, the new Blizzard patches?

I'm currently going through my triggers looking for leaks and attempting to fix them, I dont fully understand how it all works (fixing them, that is) but so far I haven't had any success after 'fixing' some of the leaks.

I've also gone through and disabled entire sets of triggers back and forth, trying to isolate if a particular system that's in use was the culprit which is where I found that disabling two small triggers seemed to make everything just werk again.

Pic related: The two probably leaky triggers.
Issue2.png

Conclusion
Sorta at my wits end here and dont really have the time to sit down and learn how to code properly, if someone here wants to take a peek through the triggers to help me solve this I guess that would work.

If you need me to post all of my triggers, not a problem. I'd rather not distribute the map however as I more then likely don't have permission (yet, calm down) for every model/icon, etc being used. It is by and large a work in progress that has become a spare time thing for me to tinker with.

All I'm asking for is someone to point me in the right direction, but if someone here wants to get involved I'm probably not going to turn away help.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Too many unit enters playable map events. Each event binding creates a region containing every cell in the map. Eventually this breaks internal game data structures and units start to act weird including walking into walls and other dysfunctional behaviour.

Solution is to use only 1 such event in the entire map. Have that trigger then run all other triggers from it. This way only 1 such region is created which is completely reasonable for the game to handle.

A neat way to implement this is to capture event response values into global variables and then change the value a real variable so that one can create an event for it in other triggers by looking for change with that real variable, kind of how most damage detection systems or special event systems work. The advantage of this approach is that one does not need to modify the actual event capturing trigger when adding new triggers that use the event.

Additionally some special event systems already have such a binding for a unit enters playable map area so it might be convenient to use such a ready made system instead of making ones own. They also come with other useful events such as unit removal or unit reincarnation which require tricky logic to detect.
 
Level 1
Joined
Aug 18, 2017
Messages
2
Holy crappers man, that took a few takes to digest. Played around with my triggers, made a sort of master 'Unit enters map' trigger and it seems to working without issue thus far.

Thank you very much good sir. I'll swing you some +rep if it lets me.
 
Status
Not open for further replies.
Top