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

[Solved] Trigger Events not working (Map Initialization)

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Hello everyone!

I have encountered a major problem with my map where map initialization triggers stopped working. I tried to change the event to Time Elasped - 0.20 seconds but the result is the same. I am afraid it might be happening with multiple triggers.

I did a research and found that other people have encountered the same problem, but I cannot find a solution.

Some of the ideas I found include:
• The bug could be a result for using another Editor.
-I am using standard editor.
• The bug could be a result for having a lot of variables with really large arrays. (over 1k)
-I have 1 or 2 such variables.
• The bug could be a result for having a lot of triggers.
-I have 970 triggers, which I compared to others that reported the problem, it's not a lot.

It's frusturating and it's not an error in coding. Yesterday it was working fine, today it isn't. I made no changes to core triggers that run on map initialization. Obviously the problem is something bigger, not a simple mistake in the actions.
 
Level 8
Joined
Oct 12, 2011
Messages
483
If you have to many actions in a single thread, you will hit the op limit and all remaining actions will be skipped. Note that some actions are more complex than others and thus will hit the op limit more quickly.
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
If you have to many actions in a single thread, you will hit the op limit and all remaining actions will be skipped. Note that some actions are more complex than others and thus will hit the op limit more quickly.

The thing is that I have not changed the trigger that isn't working. It's a trigger that runs at Initialization, plays a cinematic and then turns on about 5 triggers that are essential for the map.

Basically when I test the map, neither the cinematic is played nor the other triggers are turned on.

What is weird is that this trigger that doesn't work, I have not touched it before the problem appeared.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
I experience soemthing like that. Does all triggers disables or just Map Init triggers? If all, it might be a critical problem in WE because I have also come to this that my triggers wont wor

Option I find maybe will fix it is reinstall wc3 none else.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
You should not have any large-sized array per se, more so if you work in GUI. 970 triggers are quite an amount and probably most are redundantly senseless. Hitting the oplimit inside triggers is no problem, since those are executed in a separate thread, thus it would not kill everything.
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
You should not have any large-sized array per se, more so if you work in GUI. 970 triggers are quite an amount and probably most are redundantly senseless. Hitting the oplimit inside triggers is no problem, since those are executed in a separate thread, thus it would not kill everything.

I do not have large arrays. Even if I did have them, they would have been there for a long time. The problem showed up today.
 
can u post the trigger plz. also did u make sure that all of the actions were map init friendly ? u can do this quick by changing the event to 0.00
if it works its an action thats causing it. i have a list of the actions in my tutorial that shouldnt be used at map init.

Also for a better explanation on the op-limit look in my tutorial there is a description there.

not all cinematics are bad at map init.
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
can u post the trigger plz. also did u make sure that all of the actions were map init friendly ? u can do this quick by changing the event to 0.00
if it works its an action thats causing it. i have a list of the actions in my tutorial that shouldnt be used at map init.

Also for a better explanation on the op-limit look in my tutorial there is a description there.

not all cinematics are bad at map init.

Try to understand that in Day 1, I have my map initialization trigger working. On Day 2 it's no longer working and I haven't touched it.

And for the second time: I tried changing the event, it does not work.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
The bug got fixed by setting all variable arrays to 1.

This gives a hint that it was an operation limit (op) issue. For example integer arrays are initialized in the beginning of the map in a single thread.

set i = 0
loop
--set array1 = initialValue
--exitwhen i == initialSize
--set i = i + 1
endloop

Like that. With lots of arrays and high initial sizes, one is bound to hit the limit.
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
I am sorry that I will have to ressurect an old thread, but I guess since I am the one that started it and it's the same problem re-appearing in the same map then it shouldn't be a problem.

Anyways...

Last time I hit the OP Limit it got easily resolved by reducing most array numbers to 1 (or reducing them in general). But it seems I have once again reached the OP Limit. It's basically the same scenario again: Intro Cinematic stopped running and therefore the other core triggers that run or are enabled at the end of the cinematic don't run aswell.

The problem is that I no longer have the option to shrink arrays, cause I did it with all that could be shrinked. >_>
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
I think it would be the easiest method if you showed us your map.

After showing the map to Maker, he managed to find the problem:

Maker said:
Your map seems to indeed be hitting the operation limit, assuming there is no bug that aborts the initialization thread.

I think you could have shared variables beetween triggers more, so you would not need that many variables. But that is not the issue, variables are initialized ok.

The trouble is the triggers, you have so many. Initializing all of them cause the operation limit to be exceeded.

One solution might be to use

Event - Time elapsed time is 0.00 seconds
Trigger - Add an event a to trigger x
Trigger - Add an event b to trigger y
Trigger - Add an event c to trigger z

This way the events do not affect the op limit at initialization.

Or otherwise merge triggers.

I have merged many of my triggers into one and for now I am not hitting the OP Limit.
 
Status
Not open for further replies.
Top