| 02-08-2003, 01:37 AM | #1 |
Guest | OK. I'm creating this thread to try and clear up any confusion or mystery that the wait bug may cause us... So if anyone has ANY helpful information or relevant information not covered regarding the wait bug, please post it. So what is the wait bug? Well, as I understand it... If there is more than one "Wait" in a trigger, the "Wait" action does not work correctly in multiplayer. Specifically, the wait time is "roughly" divided by the number of human players in a game. There are a number of fixes for this problem listed at: http://www.wc3campaigns.com/forums/s...?threadid=4382 My favorite is using this action instead: For every integer 1 to A, do Wait X seconds. Where A is the number of human players in a game. The problem with all of the abover however, is.....WHEN do you use the wait bug? I'll be honest when I say that I may understand what the bug is...but I don't know when to correct it... You see, it does happen everytime. The common answer is that it only happens when there is more than one "Wait" in a trigger...well... 1) What if you "create" a new trigger from within a trigger? If you had a "Wait" in the original trigger, do you need to fix that? 2) What about If/Then statements? If you have several If/Then actions with "Wait"s, does that violate the 2 trigger rule? 3) What if you have a "Wait" before tje if/then/else statement where the else but not the then includes a wait. Does the first wait need to be corrected? 4) What about custom text? Does the no more than one wait rule then apply to each function? Or is it still for each trigger? FYI, I know CBWhiz wants everyone to use his wait bug fixer and I'm sure it works great, but personally, I'm the type that likes to "do-it" myself. I don't want to run a third party program on my map after I'm done (other than the protector). Also, does CBWhiz fix custom text? In any event, I want to know the "Why's" of a problem and not just be a sheep following the herd.... |
| 02-08-2003, 03:51 AM | #2 |
Preface: "TrigerSleepAction" = WAIT function Well my program simply opens up war3map.j, searches for TriggerSleepAction, replaces it with MyCustiomFunction, and puts MyCustomFunction up at the top, which generates one shot timers to get it accurate. It works fine for me in single, but I have nobody and no map to really test it with online. Reports of using the timer method say it works on bnet, so it should also. BTW, my program includes a map protector, but doesnt obfuscate (sp?) the code, like ExProtect. As for working with custom text, I havent tried, but it SHOULD work provided you call Code:
TriggerSleepAction (2.00) Code:
TriggerSleepAction(2.00) BTW, I've gotten reports that it doesnt work always. can someone PLEASE verify if it works or not? Im getting pretty much no feedback ;) BTW2: yes, calling TriggerSleepAction twice in the same function in custom text does bring on the wait bug. Callign it in seperate functions, however, is a good idea that should be tested ;) |
| 02-08-2003, 05:33 AM | #3 |
The only real time I need to use multiple wait actions in a single trigger is during cinematics. I get around this by breaking up the major cinematic functions into seperate triggers that I place in an appropriate Cinematic category, ensuring that only one wait function exists in each. This works excellent in multiplayer, and does not require for loops to attempt to adjust the timing. I simply add the triggers I need ran to the trigger queue, so everything runs smoothly (never forget to remove the trigger from the queue). I prefer this method to the for loops for one very good reason; for loops add to the amount of processing required. Generally no big deal, but if you have a lot going on, and a bunch of for loops being iterrated, some folks may lag. Not only that, but breaking up major tasks into seperate triggers reduces the number of actions in a single trigger. This definately helps in readability and debugging, as you can narrow your focus of a problem much easier. |
| 02-08-2003, 07:14 PM | #4 | |
Guest | CBWhiz: Thanks for posting how your wait bug fixer works. That sounds like it oughta work everytime. Did the people who report that it didn't always work give any indication WHAT didn't work everytime? rwxr-xr-x: That's a good solution, but not one I can always use. For one, it requires a new trigger everytime you want a second or third wait. That poses me a bit of a problem in custom text where I may need to pass info into a new trigger. Still I could probally work around this if I knew the answer to #1. Quote:
Above, I'm talking about using the: set X to Create Trigger() Add action to X Add condition to X Add event to X I'm also really suprised that this thread hasn't had more responses. I would think there would be more wait bug knowledge floating around. Odd that there isn't more info regarding my 4 questions... |
