Wac limits? :( (DFX/JO)
So i am experiencing sys error crashing the game and it seems to be linked to the WAC. Im not aware of any WAC limits, but this has me baffled.
What ive gathered so far, the problem seems to stem from the looping wac scripts and med events. My map requires many looping wac scripts (does not contain "never ()") to test the trigger conditions repeatedly throughout the game. my theory is that theres a limit to how many triggers and actions can be tested on a loop at once. Heres some map specs and what i know so far... Singleplayer WAC size 37kb 1600+ WAC lines 160+ med events 700 decorations Less than 30 AI The problem: 1) If i add one more trigger or action to any looping WAC script (does not contain "never ()") then it will cause a sys error during map load. 2) It does not matter what type of trigger or action. 3) it does not crash if the action or trigger is added to a non looping script (containing "never ()"). 4) adding new triggers or actions to looping med events causes the same error. 5) game crashes right before the map is completely loaded. Has anyone heard of such an issue? Any ideas? |
WAC meltdown is usually caused by invalid objects in the map, incorrect values for variables, wac statements with incorrect wording (syntax).
Also as you can imagine one action can cancel out another action, this is especially so when looping commands are still running and other actions are called at the same instance. |
If you're not doing so already, try using variables to switch, I rely heavily on them to build huge wac files, in this example the wac is well over 1000 lines.
Code:
;Operation Twilight |
Here is a small section triggering events using the vars.
Note that actions for v18 are set in the MEd event editor. Code:
// ***MassAttack*** |
Now we get to always on events
Code:
// ***RANDOM*** |
Quote:
Initially, i was thinking the same. There must be a conflict in some of the loops or something. I looked through everything and i don't see where a conflict could have occurred, but the map is very complex using several scripts, events, and variables. So it is hard to tell If this was the case though, then why would the error occur no matter where I put a command, or what kind of command it is for that matter? It will only happen if you added something to a looping trigger. Even if you added one more simple looping script like... If past(1) then Text ("test") Endif ... the error would occur. I have removed a few looping scripts that were necessary and it has fixed the issue for now. But i feel that it will return once i add more stuff to the WAC. :dontknow: |
So, once again i have run into the error. (I knew it would happen again once i added a certain number of looping scripts)
Im trying to get to the bottom of this. I experimented and pasted my wac into a new blank map and it caused the same error. And again if i remove a looping script (doesnt matter which one) it will fix it. This suggests that there is nothing in my maps events or objects causing the error. Its all in the WAC. |
Quote:
|
Quote:
I added a new looped script with not action... If eq(v60, 1) then Endif ... the game runs fine. But as soon as you add an action, even something as simple as text ("testing") it will crash. But if you remove 1 action from another looped script it will work again. |
Quote:
Also leaving out never() is not really looping in the strictest sense of the word, instructions in the same stream may be executing in the same instance, shorten your script and leave as many vars switched off until needed, use else, chain, link etc to exclude or reduce incidences of them queuing too long or firing whilst other variables are operating. |
Quote:
If past(1) then Text ("test") Endif try the following script with a delay of 7 seconds between the text display. Code:
if past(1) and elapse(7) then Trigger the values 1 to 3 from elsewhere in the wac or med. Code:
if not eq(v60,0) then Code:
if not eq(v60,0) then |
Maybe even this may work?
Code:
if not eq(v60,0) then |
Quote:
Here are some examples of scripts from my maps WAC... Code:
;===v Player kills counter v=== |
Ok
|
Reckon it has anything to do with using a 64 bit OS? Not sure why that would make a difference, but its just a thought.
|
Quote:
|
Extrapolating on what you've put here...
Perhaps you could try this to circumvent v16 = 1 on init. Code:
// v16 ;counter |
Quote:
Im not where i can test this at the moment, but wouldnt v17 continue to climb as soon as v16 is gt 1? So if you get one kill, the counter (v17) would just keep increasing every second. |
Quote:
Also your difficulty script looks like it only counts upwards. Try this to lower the difficulty one level below the current one on death. Code:
if piskills(v16) then |
Here's a simple alternative - I made this while back for another map but the var numbers shouldn't matter and you can drop it straight in just change the group and add weather etc...
For difficulty the ai just alternates between 2 standards. Code:
;by stompem 2017 |
well see I want the level of difficulty to increase or decreased based on the players points in 5 point intervals. The player loses 3 points if he dies. The script I've got works fine for that.
if the player has 15 points and dies several times and drops back down to say 9 points, the difficulty will drop back down as well. points will not go below 0 (if V17 lt 0 then set V17, 0) and when the player reaches 20 points, the objective is won. |
Quote:
What if the ai kills itself accidentally? |
Quote:
It doesnt matter how many times the player is killed. V17 (players points) will not go below zero. If an ai kills itself or is killed by another means (like a mortar) it wont count as a player kill because v17 only increases if the player makes the kill. |
Note that vars can go below zero and looking back over this thread, you have left out crucial info making it difficult to know if you have accounted for this.
Your'e asking questions and my suggestions are based on the questions and bits and pieces. The scripts I've posted work solidly, I posted them to aid you (and others) so I kindly suggest you look them over a little more closely and then if you see an issue, tell me how I they are wrong? Also you said... Quote:
|
Quote:
Your examples are very helpful and i do learn from them, thank you... As i said in my previous post, v17 will not go below zero via a script in the wac. If lt(v17, 0) then Set (v17, 0) Endif V17 is the actual points displayed to the player. If eq (v14, 1) and ssnarea (10000, 9) then Text("========") Text#("kill points:", v17) Text ("========") Endif V17 increases by 1 for every kill the player makes. It decreases by 3 for every time the player is killed. |
Quote:
Also, I'm not sure that I understand your statement that piskills is an action. It's a condition not an action is it not? piskills is a condition that says if the player has killed X amount of enemies. |
Contradictions again my friend?
Aaaah well. Just trying give you any info that may or may not help you shorten your wac and also help prevent any possible oversights, as I said it's hard to answer you accurately when you are so cryptic about your answers to my answers. I can go back over many of my own maps and now see (with extra info) that I could have shortened them further, or rather, made them more efficient. It's all about Flow control. Imagine that you're trying to stream it all down a narrow funnel neck. BTW Here's an example of a negative var for you. It's a timer script that I shortened years ago. Code:
if never() then |
Can you see any difference between these timer scripts compared to traditional methods?
Do you think they may be more efficient? Notice I am using exclusion rather than inclusion. |
Quote:
Contradictions? What do you mean? Ill check out those scripts tomorrow, gotta get some sleep. Thanks. |
I've investigated concatenation, single line statements etc but I don't know enough to advise you reliably on that subject and I really don't know if it saves on overhead but it may help you.
Example: Code:
if past(1) and never() then set(v17,5) endif |
Quote:
To clarify it would've been far better if you'd posted all the connected vars early on. Not having all the connected vars certainly does makes it cryptic. As for contradiction? Questions on answers need to stay relevant and answers are only suggestions, so it's polite to accept them and move on. Also in regards to v17 again... Quote:
My apologies but that's how it looks. |
Quote:
In the example i gave, all of the linked variables were there. The only thing i really left out was the script that will not allow v17 to go below 0. My apologies, i just didnt think it was important info. The single line idea is intetesting. Its worth a shot. Ill give it a try... |
Quote:
|
Quote:
As I said, not sure if it saves overhead but if it's a line limit vs character limit then it may get you home. :gj: |
All times are GMT -5. The time now is 01:46 AM. |
Powered by vBulletin®