hey i got a map where u get a bether unit if u got like 10 marines etc i am using a if u nit enters event and set variable to + 1 but if there are more then like 100 units the trigger stops working becouse of to many treaths so how is it possible to make it more stable
I am pretty sure with some simple re-organizing and use of variables and arrays, you can get rid of more than 90% of your triggers easily. From the looks of it, you know there are variables, arrays and loops. Why don't you use them?
€ well, not like this :D
spawntank43EventsTimer-Every60.0secondsofGameTimeLocalVariablesConditionsplayerspawn6==trueActionsGeneral-Repeat(Actions)1timesActionsGeneral-Repeat(Actions)(NumberofLivingunitsin(FactoryunitsinRegion007ownedbyplayerAnyPlayermatchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount))timesActionsUnit-Create1SiegeTank(TankMode)forplayer6at(PositionofXel'Naga Shrine (Xil) [156.27, 111.88]) using default facing (No Options)UnitGroup-Add(Lastcreatedunit)tounitgroup8
With almost 300 (!) triggers of this kind, it doesn't surprise me, that you reach the thread limit at some point.
I am pretty sure, you can put these 300 triggers into one single trigger
if your map is really using 300 + triggers then I think you need to take a step back and rework how your handling some things.
300+ triggers by itself is just fine, 300 triggers alone do not even touch the thread limit, if handled correctly. But those are 300 copys of one and the same trigger! Just put all the stuff in some arrays, run a small loop, and you have all of it in one trigger.
I am pretty sure, there are similar redundancies in other triggers causing the too many threads error.
Have as few triggers as possible. Each timer is a thread, use one timer that runs say every second and run everything else off that using integers.
Edit>
As said above, most of your triggers are copies of each other, you want as few 'events' as possible. Use Switch instead of all those IF THEN statements, and add a "Break" after it finds the unit.
i cleared up the triggers now a bit and made some changes working more stable now but maybe someone finds a bether way how i do merge the units the goal is to put every unit that is createt like a marine or reaper is set into an variable that counts how many of the units are on the field from one side
so if like 10 marines from one side are on the field a new lets say hero unit spawns for the team and the 10 marines are getting removed from the field
You can combine all your income triggers into a single trigger, the same with all the spawn triggers. I still ain't touching this map with a 10 foot pole =\
hey i got a map where u get a bether unit if u got like 10 marines etc i am using a if u nit enters event and set variable to + 1 but if there are more then like 100 units the trigger stops working becouse of to many treaths so how is it possible to make it more stable
Holy cow!
I am pretty sure with some simple re-organizing and use of variables and arrays, you can get rid of more than 90% of your triggers easily. From the looks of it, you know there are variables, arrays and loops. Why don't you use them?
€ well, not like this :D
With almost 300 (!) triggers of this kind, it doesn't surprise me, that you reach the thread limit at some point.
I am pretty sure, you can put these 300 triggers into one single trigger
I wasn't even able to find the merge trigger.
Unless you absolutely want the merging to be done with triggers you could use data for a multi unit merge system: http://www.sc2mapster.com/forums/development/data/23405-puke-a-lisk/#p18
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@AluCardvanHellsing: Go
How about have a "merge button"
you could do this several ways
if your map is really using 300 + triggers then I think you need to take a step back and rework how your handling some things.
300+ triggers by itself is just fine, 300 triggers alone do not even touch the thread limit, if handled correctly. But those are 300 copys of one and the same trigger! Just put all the stuff in some arrays, run a small loop, and you have all of it in one trigger.
I am pretty sure, there are similar redundancies in other triggers causing the too many threads error.
Use loops for the arrays.
Have as few triggers as possible. Each timer is a thread, use one timer that runs say every second and run everything else off that using integers.
Edit>
As said above, most of your triggers are copies of each other, you want as few 'events' as possible. Use Switch instead of all those IF THEN statements, and add a "Break" after it finds the unit.
i mean in the folder hero spawn there are the merge triggers i know there are alot of ways to make this easyer but i had no internet to look in here
i cleared up the triggers now a bit and made some changes working more stable now but maybe someone finds a bether way how i do merge the units the goal is to put every unit that is createt like a marine or reaper is set into an variable that counts how many of the units are on the field from one side
so if like 10 marines from one side are on the field a new lets say hero unit spawns for the team and the 10 marines are getting removed from the field
Then do that.
You can combine all your income triggers into a single trigger, the same with all the spawn triggers. I still ain't touching this map with a 10 foot pole =\
income is allready 1 just dont updated version
just need helpwith this merging trigger =/