1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  4. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  5. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Sudden and random problems with init.

Discussion in 'Triggers & Scripts' started by NeverDeath, Aug 4, 2011.

  1. NeverDeath

    NeverDeath

    Joined:
    Jul 27, 2008
    Messages:
    86
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Hey all. I never really post for help here, I never usually need it - but I've run into a problem when almost finished with the latest version of my map, The Dawn of Battle AoS. I got a lot of feedback and requests to finish the map with an updated version, so I finally said sure, I'll do it.

    Well just last night, I noticed my initialization code acting pretty wonky when loading up to test some things, but the strange part is, I haven't touched anything to do with initialization code in about a year and a half, nor have I added any new initialization triggers. I know for a fact a few days ago, the things that are misbehaving were not screwed up, and I know that logically I would expect that none of the things I have changed since then (abilities are pretty much all I've been working on the past month, the initialization was fine a day ago).

    So my question is, can the initialization triggers be screwed up by code from another area of the game? The two problems I have noticed (so far) is that A: My random hero selection stopped working (I checked the code, it's all fine just like it was before), and B: My multiboard isn't putting the icons of the heroes on it anymore, just the null green boxes (again, I checked the code thoroughly, it's all fine).

    In AoS maps, and especially in complex ones like mine, there are hundreds if not a few thousand triggers for custom abilities, item recipes and other things, hundreds of units, and about 1500 custom abiilties. I could retrace my steps but that could take many days just to cover the changes I made in a day. Does anyone know of any certain things that could have caused a multiboard trigger and a random hero array (or the creation of its random trigger unit) to cease working properly? Everything else works fine, but I refuse to release the map with things broken, so it's going to delay my progress until it's fixed.


    Thanks in advance for any responses.


    -Never.
     
  2. NeverDeath

    NeverDeath

    Joined:
    Jul 27, 2008
    Messages:
    86
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Well, nevermind, I guess something (still unknown) was causing my map initialization to screw up ONLY when setting arrays (despite the fact it worked fine for 1.5 years). So I'm just going to put this here in case someone else gets a problem with things behaving strangely out of nowhere - working on custom skill triggers can in some cases, apparently, screw up the "Map initialization" event, at least when assigning integer arrays.

    The common link between my multiboard icons and my random hero select were that they both used integer arrays. I set them both to run at .5sec gametime rather than initialization and they work fine. This could save someone from going mad trying to figure out what is wrong in their thousands of lines of code, so I thought I'd post my findings here, in case it ever comes in handy. Phew, thank JESUS.



    Edit: Found a new problem, turns out the map works fine in all areas except one - no new triggers can be made; They simply won't work. I've tried to make a couple of custom abilities (I know what I'm doing with those), and pretty simple ones, mind you - but since whatever damaged the initialization trigger, no further trigger adjustments will work. Even a simple addition of adding/removing unit collision to an existing trigger will not have any effect in-game whatsoever. If anyone knows anything about this, I have only one inkling - which is that it may the dreaded "unit bug" with the hero I was working on when these problems began. I have heard that sometimes the editor takes a dump all over itself, and for some unknown reason will cause a unit or ability to "bug", to where it basically causes all kinds of nasty and seemingly random problems to the map. I haven't yet tried deleting said hero and remaking him, but I think I'm going to try that next - I was just wondering if anyone can confirm the validity of this rumor I've heard about units/abilities glitching and causing strange side effects until removed?
     
    Last edited: Aug 4, 2011
  3. Garfield1337

    Garfield1337

    Joined:
    Jul 6, 2009
    Messages:
    1,806
    Resources:
    4
    Maps:
    1
    Spells:
    3
    Resources:
    4
    You're probably exceeding op(eration) limit. I'm not much familiar with this, but as far as i know, executing too many operations at a time causes none of them to work. I suggest you separate your actions in several triggers if you have many actions at initialization. If it doesn't help, execute them in small intervals.
    Also make sure that, if you're using GUI, you don't put any big value for "size" field for variables in variable editor. This value defines up to which index are variables initialized with 'Initial Value'. Initializing too many variables can exceed op limit too.
    If you need to initialize many variables, just spread it in multiple triggers.
     
  4. NeverDeath

    NeverDeath

    Joined:
    Jul 27, 2008
    Messages:
    86
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Hey Garfield, thanks for the reply. The tricky bit is, none of what could have caused problems could possibly be with the initialization triggers, since technically now (after changing the last two), I have ONE initialization trigger, the rest are as you suggested, run at intervals/time elapsed.

    I'm not familiar with the operation limit either, I couldn't find anything Googling/searching WC sites for info on any type of trigger/function limit etc. My only thought was that maybe I had used the line "a unit starts the effect of an ability" one too many times, or something of that nature? Because I literally hadn't touched any initialization triggers in over a year, nor made any new ones since then. The arrays were both of number 55 to deal with the random selection and again to deal with the icons on the multiboard (I have 55 heroes, thus 55).

    I have a hard time believing that the number of triggers in my map, assuming there is no limit to the number of triggers you can have, is NOT the problem, simply because I must have close to 1000 of them between systems, custom abilities, AI pathing, etc. (lol). I just wish I knew why whatever was wrong was causing the initialization triggers to freak out. It isn't doing it anymore, like I mentioned, but now NO new triggers will function properly. Thankfully I only had one of the 55 heroes left to revamp, and he wasn't terribly boring, but I think I have to flat out give up on figuring out the answer with all of the triggers/units/abils in my map, unless someone who IS familiar with this kind of silliness could clue me in. Thanks for your help though, Garfield. +rep to you, good sir. You've taught me a few useful things that could have caused future problems, whether or not they explain my specific issue.