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

Triggers suddenly not working

Status
Not open for further replies.
Level 8
Joined
Jul 18, 2010
Messages
332
Ok I've been searching for the answer to this problem and I know now that it's about large size array but the problem is it worked for me but then, when I try to add new triggers, I get the same problem again. Anybody knows why? The 2 kinds of arrays that I only have are those that have 1 and 12 array size. Map initialization doesn't work and some triggers. I doubt there's something wrong with my triggers. If anybody knows if there's a variable, trigger, or array limit, please tell me.

Please help, I can't continue my map anymore because of this problem.
 
Level 13
Joined
Sep 13, 2010
Messages
550
If anybody knows if there's a variable, trigger, or array limit, please tell me.

Please help, I can't continue my map anymore because of this problem.

There is. Not limit like the way you think, but your trigger initializers, array initializers, units placed in map are all running on a JASS thread etc, etc, which has an Operation Limit, so if it hits that, thread will crash, and game won't work. For example, no units appear ingame, no triggers work, no items, no displayed texts, etc.

Shortly, you shall have array sizes on 1 not on 8192, it will make NO DIFFERENCE, and your map won't crash on initialization. You also can reduce the number of units in the map, however that will help the least.

PS: We are talking about GUI triggers, right?
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
not completly right, every function onInit is run on separate thread(ExecuteFunc(...)) at least JNGP does it that way and when you have endless loop in init trigger nothing special happens, the only thing is that the map will load a little bit longer

the limit for arrays is 8192 indexes(the last being 8191 but there are rumours about the 8191 index making some weird shit happen) and yes GUI size doesnt matter but I also encounraged game crash once when I put to all variables(40 of them) 8192 size, when I put it back to 1 it was fine, so use 1
there maybe is some limit in variables and triggers but the real limit is how much your mashine can handle, each variable takes space on your RAM and each trigger takes a little bit size of map(in multiplayer your map cant have more then 8 mb or you wont be able to play it on BattleNet) so no not really but try avoiding using a looooot of variables because not everyone has gigs and gigs of RAM
 
Level 8
Joined
Jul 18, 2010
Messages
332
Still not sure if it's because of the new triggers that I add.

Ok, I already know that thing with arrays but what about variables involving players and player groups? Should I set them also to 1 instead of 12?

So are you saying I should have less variables (I already have thousands of them I think), less actions on map initialization, and less arrays?(I only have arrays with sizes 12 and 1. The ones with 12 are the variables involving players and player groups. Should I set them also to 1 instead of 12?)

How about the amount of triggers. I already have hundreds of them. Should I also minimize them or is it only about map initialization?

What I really need is the solution cause I already know that thing about arrays. I once have this problem because I had an array with a size of 8191, it was only one variable. And then after awhile, the problem came then I found out it's because of the array. I've solved it then but the problem came back again and here I am now. So it's probably not just the arrays but with the amount of variables that I have.
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
try to reduce number of Map Initialization to as small as possoble, also try to avoid using too many stuff in it, if you feel your Map Init has goo many actioms split them so the heavier ones(for loopc etc) put to trigger with event Time - 0.00 seconds or how is it called so you minimize chance to crash onInit triggers
GUI lies to you, all variables are lf size 8192 no matter how hard you try and while its not that much of a problem you should maybe make all spells for instance that ard instant use the same variables so you safe space, more variables - higher requirements on your RAM capacity
the number of triggers doesnt matter that much, if you dont have too many periodic loops(Time - every x sexonds) they will affect mostly only map size
if yoi have too many looping triggers it may cause laggs or fps drops
 
Status
Not open for further replies.
Top