From what I can tell this is caused after a trigger is ran around 1000 times. But this is sometimes, as in my situation, needed, so my question is, is there a way to let triggers run more then 1000 times without this error?
This is more likely caused by running the trigger 1000 times SIMULTANEOUSLY...
Have you a place where one trigger calls another one ? My guess would be that you have some kind of recursion.
Maybe, I got a trigger running a action definition and that action definition runs a action definition, but the first action definition uses a while function. The while function has a waiting period. Anyway, I'm thinking, if what you said was true, then it's the while thing not giving up on the 2nd action definition, but Idk how I would fix that. Also, I got a different trigger that had this problem b4 I redid it that didn't use a while loop or action definitions or was a action definition, but it still had this error. That trigger was a periodic event checking distance between unit groups. So I'm thinking they are limited to a certain number of times or something. I tried turning a trigger off and then on to see if that would do any thing, and nothing changed (Idk if currently playing triggers stop if you turn a trigger off tho). So any ideas and what not?
Never use waits in while loops. Every while loop is a new thread, use events instead.
Stopping the current trigger will stop the current trigger but events can still trigger it. Turning a trigger off will not stop the current trigger but will disable the events.
What do you mean by not using waits in while loops? If you don't add a wait into it then it will play every action instantly and repeatively until the condition is met. What do you mean by use events instead? Referring to the condition?
Also, the trigger the has the error popping up in game isn't the one with a while loop inside.
I have narrowed down the issue to the action definition in general. I have no clue how to fix this tho. Any ideas? Basicly if any action definition runs 1019 times it will give you this error. My first definition only runs once per main unit (1 per player until player death). . But at the second action definition I will get the error after running it 1019 times. Even if I take away the while action. So I guess the trigger is staying there, even tho it has no function after the first few actions.
Make sure you only use one unit dies event as as few other events too if possible.
It does not matter how long a trigger is but it matters how many threads are running at the same time.
If you have 5 unit dies events and on your map there are 50 units. If a nuke is fired at those 50 units that means your unit dies event fire 5 x each unit. That is 260 threads in an instant.
Most of these functions can all fit into the same trigger it does not matter if it becomes extremely long. Do this for periodic events too if possible. Rather than rely on periodic events look for more creative ways to trigger an event. Use "run trigger" actions in other triggers rather than a loop which constantly tests for an event.
Yeah, figured that much out. But my problem is from blizzards engine, not from that. Basicly they made action definitions never end. Even after their actions are all done. I don't get why they did that, but that's the only thing I can think of. And there are no actions to turn a action definition off... so... bleh.
I tested this a lot of times.. that's the only thing It can possibly be from my results... If it's clearly wrong then please point something out. I don't mind being wrong if it helps me. =D
But I know for sure it's the creation action definition and I have tried to do it under different circumstances and it doesn't change the results.
ah ok I get your problem now I think ... the option create thread is horrible (just convert it to script and look at it ..)
instead make it a trigger, save your parameters to global variables and run the trigger as new thread and in the trigger copy the globals to locals ...
I can't use globals because it's making a unit at a specified point at a specified angle for a specified units after 3 seconds of waiting. Globals get replaced on top of each other. Actually I got an idea, tho it sounds stupid. I'll see if this works.
Yay fixed it. But turns out it had nothing to do with action definition. It was just telling me the error was coming from the wrong trigger. But the trigger was related to it. I had a trigger that I thought was only running once every time a unit spawned, but it ran for the unit and never goes away. It's called a visibility modifier or something like that. Well, been about 5 hours of looking, but it's finally done. Yay. It also helped reduce lag I had at end game. =D
From what I can tell this is caused after a trigger is ran around 1000 times. But this is sometimes, as in my situation, needed, so my question is, is there a way to let triggers run more then 1000 times without this error?
Thanks.
@Skittles17: Go
This is more likely caused by running the trigger 1000 times SIMULTANEOUSLY... Have you a place where one trigger calls another one ? My guess would be that you have some kind of recursion.
@tmahring: Go
Maybe, I got a trigger running a action definition and that action definition runs a action definition, but the first action definition uses a while function. The while function has a waiting period. Anyway, I'm thinking, if what you said was true, then it's the while thing not giving up on the 2nd action definition, but Idk how I would fix that. Also, I got a different trigger that had this problem b4 I redid it that didn't use a while loop or action definitions or was a action definition, but it still had this error. That trigger was a periodic event checking distance between unit groups. So I'm thinking they are limited to a certain number of times or something. I tried turning a trigger off and then on to see if that would do any thing, and nothing changed (Idk if currently playing triggers stop if you turn a trigger off tho). So any ideas and what not?
Thanks.
Never use waits in while loops. Every while loop is a new thread, use events instead.
Stopping the current trigger will stop the current trigger but events can still trigger it. Turning a trigger off will not stop the current trigger but will disable the events.
If you want better help, post some code
@SweetZombieJesus: Go
What do you mean by not using waits in while loops? If you don't add a wait into it then it will play every action instantly and repeatively until the condition is met. What do you mean by use events instead? Referring to the condition?
Also, the trigger the has the error popping up in game isn't the one with a while loop inside.
I have narrowed down the issue to the action definition in general. I have no clue how to fix this tho. Any ideas? Basicly if any action definition runs 1019 times it will give you this error. My first definition only runs once per main unit (1 per player until player death). . But at the second action definition I will get the error after running it 1019 times. Even if I take away the while action. So I guess the trigger is staying there, even tho it has no function after the first few actions.
Does any body know what a function definition is?
please just copy-as-text the trigger generating the error
fine... Let me post the trigger that is useless to read here... first: http://pastebin.ca/1928101 Second: http://pastebin.ca/1928103 Third: http://pastebin.ca/1928105
Didn't mean for that to sound mean... but I seriously doubt this will help what so ever...
Thanks.
Make sure you only use one unit dies event as as few other events too if possible.
It does not matter how long a trigger is but it matters how many threads are running at the same time.
If you have 5 unit dies events and on your map there are 50 units. If a nuke is fired at those 50 units that means your unit dies event fire 5 x each unit. That is 260 threads in an instant.
Most of these functions can all fit into the same trigger it does not matter if it becomes extremely long. Do this for periodic events too if possible. Rather than rely on periodic events look for more creative ways to trigger an event. Use "run trigger" actions in other triggers rather than a loop which constantly tests for an event.
@gorang: Go
Yeah, figured that much out. But my problem is from blizzards engine, not from that. Basicly they made action definitions never end. Even after their actions are all done. I don't get why they did that, but that's the only thing I can think of. And there are no actions to turn a action definition off... so... bleh.
That isn't true and you're clearly doing something wrong.
@RileyStarcraft: Go
I tested this a lot of times.. that's the only thing It can possibly be from my results... If it's clearly wrong then please point something out. I don't mind being wrong if it helps me. =D
But I know for sure it's the creation action definition and I have tried to do it under different circumstances and it doesn't change the results.
ah ok I get your problem now I think ... the option create thread is horrible (just convert it to script and look at it ..) instead make it a trigger, save your parameters to global variables and run the trigger as new thread and in the trigger copy the globals to locals ...
@Zytrug: Go
I can't use globals because it's making a unit at a specified point at a specified angle for a specified units after 3 seconds of waiting. Globals get replaced on top of each other. Actually I got an idea, tho it sounds stupid. I'll see if this works.
Thanks.
Yay fixed it. But turns out it had nothing to do with action definition. It was just telling me the error was coming from the wrong trigger. But the trigger was related to it. I had a trigger that I thought was only running once every time a unit spawned, but it ran for the unit and never goes away. It's called a visibility modifier or something like that. Well, been about 5 hours of looking, but it's finally done. Yay. It also helped reduce lag I had at end game. =D
Thanks for helping out everybody.
(Btw, I love being wrong!)