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

Triggers not working in map

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2011
Messages
182
I am using the last pack of Jass and my map works good in the editor but when i try to play it the triggers are like gone...

my map is 47 m so i dont put it here. But it was working fine.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
As a rough guess, your initialization thread crashes due to the op-limit. This is common if you use a lot of GUI variables/triggers or a few GUI arrays with a size set to something large like 8000.

I put here the 2 maps. Maybe they are corrupted. Please i need help.
No you did not, there is no link to the map as far as I can see.
 
Level 6
Joined
Apr 23, 2011
Messages
182
As a rough guess, your initialization thread crashes due to the op-limit. This is common if you use a lot of GUI variables/triggers or a few GUI arrays with a size set to something large like 8000.


No you did not, there is no link to the map as far as I can see.

I cant the map is way to Big, But um.... how many ??? Because i have like 100 of 8192. IS that a lot ???

because no mutter even i add a single trigger that displays = hello to all players it wont work....

__________________________________________________________________________

Okey now it works, Thanks!! But i will still like if you can tell my why it does this strange things because sometimes i think that wc3 limits my computer. I mean they say Newgen allow no limits... And then this happens. And for me is important because i dont use Index soo i have to create TEMP_1,2,3,4..... ect
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
my map is 47 m so i dont put it here. But it was working fine.
What does "47 m" mean? Where I'm from, it's either "47, male" or "47 meters". Neither of those fit a map description.
It's also hard for us to help when the only clue we've got is "it doesn't do the stuff it should do". Perhaps you should consider uploading the map?

DSG does indeed have a valid argument, check that first.
 
Level 6
Joined
Apr 23, 2011
Messages
182
Solved!! Thanks Dr Super Good. The problem was with the arrays.( tested and work really good even that has a lot of leaks ) I just dont understand whats the diference between setting 5,6 arrays to size 8129 at map init or during the game letting them grow up.

Now they are size 1. big but i can still use them like they are 8129. And i have like 10.000 leaks and still works without lag even not using idex system, and using 0.01 triggers ( 275 ). And using RIPS in the map. ------ Sometimes i think wc3 editor is weird ----

My map was 47 mb and too tell the truth that can take ages.

PD* other really weird stuff on the map is that when i execute in administrator mode it tells me that have errors of BJ_Abilitys and some really weird stuff. But when i do syntaxis check it doesnt say anything. !?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I just dont understand whats the diference between setting 5,6 arrays to size 8129 at map init or during the game letting them grow up.
Arrays will always work from 0 to 8191, there's no problem with that.
Now the problem comes when you want to initialize about 8000 values at 1 time. A computer needs a lot of processing power for that: there's a maximum amount of operations a PC can perform every interval.
The program just can't handle this many operations in that time. When you gradually use these arrays over time, then it's no problem, because you're only using those operations one at a time.
(Note that this is just a way of looking at it, actual internal workings might differ).

And i have like 10.000 leaks and still works without lag even not using idex system, and using 0.01 triggers ( 275 ). And using RIPS in the map. ------ Sometimes i think wc3 editor is weird ----
Leaks work over time, when too many of them exist it starts to slow down the game. It doesn't affect the map directly.
It's also a matter of how good your PC is. Do try to keep the memory/processing power required for your map to a minimum, so people with PC's that aren't that great can still enjoy it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Now they are size 1. big but i can still use them like they are 8129.
With a few restrictions.

Some GUI actions rely on arrays having an initialized value to them. If they do not have this value, there is a chance they may not work as intended. The simple solution is to initialize indices when you require using them.

There is also the problem of reading from a yet unused index. What value can you expect to be returned since there was nothing previously written there? It is advised that an index you want to use you write to first before reading from to make sure a reasonable and expected value is returned (this can be done an index at a time as the index is required for use).

And i have like 10.000 leaks and still works without lag even not using idex system, and using 0.01 triggers ( 275 ).
Leaks slow down certain game operations depending on the type of leaks. Eventually with enough leaks you will find some operations are so computationally expensive to perform that they can cause frames to be dropped (common one is strings which is the only non-fixable leak in WC3). Running triggers 100 times a second is very computationally intensive as JASS is very slow (orders of magnitude slower than real program code). Running 275 triggers 100 times a second could easily eat most of your usable processing power meaning that the slightest intensive situation (huge fight, lots of models on screen) will have to drop frames to keep timing.

Frame dropping occurs in two situations...
1. The system lacks the necessary computational resources to keep the game engine update period and generate the shader instructions for rendering the graphics. To prevent the reduction in game engine update period it will start skipping generating the shader instructions up to a certain number of times (there is a limit on skipped frames before it forces a frame to prevent the process from becoming completely unresponsive).
2. The system graphic accelerator is still busy executing shader instructions when it comes time to swap display buffers. Executing the shader instructions is so intensive that it takes more than 1 display period to perform. Depending on how the game handles feedback from the graphic accelerator, it may buffer/discard shader instructions or skip generating them entirely.

1 is what most frame skipping is in WarCraft III. Due to the nature of this type of frame skip, you can often find that the number of skipped frames per second sky rockets very easily once it starts because the amount of time saved by not generating the shader instructions is quite small. This obviously comes from the old organs of WC3 where processors were slower so the shader instruction generation took fractionally more of their time.

2 is virtually impossible in WC3 in this day and age. Modern gaming graphic cards are so strong WarCraft III barely loads them even when extra visual enhancements like 16x Anti-Aliasing are turned on. The only time you may notice this is in certain visually intensive states. An example is many near full-screen sized alpha billboards which become very expensive to render at that size for some unclear reason (probably related to graphic enhancements).
 
Last edited:
Level 6
Joined
Apr 23, 2011
Messages
182
Thank you both for you answers. But i still dont underst the trigger map init.

I thought that Elapsep time 0.00 means you run all actions in 1 second ( or as fast as your computer can run it )

But map init for me is the map load bar. Like for example if your trigger Map Init is big it will take more time before you start playing.

Maybe this question is silly. But if a use a program to Run Faster Wc3 , ( like x2 ) and i have triggers in my map that are 0.01 second. ¿ This means that actually the computer is forcing 0.005 second?.

Also like if a make a trigger 0.01 sec and put For each variable do like 10 times. ¿ It means it goes each variable in 0.001 ?

Again thanks a lot :) Now my map is working good. And i try to remove all potencial leaks.
 
Status
Not open for further replies.
Top