• 🏆 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!

WTF? Every single trigger just stopped running.

Status
Not open for further replies.
Level 3
Joined
Mar 9, 2016
Messages
45
Hello. I just made some adjustments to my map and ran it to test the changes, and suddenly not a single trigger worked. They dont even run... I've tried with a simple Map Initialization - Display Text "SFSFAS" To all Players... No conditions, no nothing. Doesnt work. The triggers just dont run. Has this happened to anybody else? How do I fix it?
 
Level 3
Joined
Mar 9, 2016
Messages
45
Have you tried creating a new map and doing the game message thing?

Are your triggers enabled?
Do you have initially on unchecked?

Have you tried removing the adjustments, if they were trigger related, to see if that works?

yes, triggers on new maps work.

triggers are enabled, yes
yep, triggers initially on are checked
the adjustments were data-related if i recall correctly... :S

thanks for the reply :)
 
When you create Int/real/point/ect... arrays, the compiler will automatically give it the full index size so you don't have to specify array size. However thats not the case with unit group arrays. If you set group size to 4 then units can't be added to group[7]. Setting group array size to 8k can cause your triggers to fail.

You can create group arrays on the go:
  • Custom script: set udg_someGroup[7] = CreateGroup()
You only need to give someGroup[ ] 1 index size then use the function above. units can now be added to group[7] :)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,578
Thanks for posting how.
Still useful in 2023!
Unit Groups, Player Groups, and Timer arrays all need to be initialized manually. This can be done using their create functions:
  • Custom script: set udg_UnitGroupArray[1] = CreateGroup()
  • Custom script: set udg_PlayerGroupArray[1] = CreateForce()
  • Custom script: set udg_TimerArray[1] = CreateTimer()
OR, you can set their array Size inside of the Variable Editor to create them automatically, but that's often overkill since you won't always be using all of them.

Note that the Size limit increased to 32,768 in patch 1.31.
 
Last edited:
Status
Not open for further replies.
Top