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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. 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.

Bugged Triggers

Discussion in 'World Editor Help Zone' started by MatiS, Aug 6, 2015.

  1. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    Hi,
    I have weird problem with my world editor. I searched internet, and I didn't find any information about sth like that. When I make the spell via triggers everything works correctly 'till I make it MUI. After that, cast trigger doesn't launch, even if it's perfectly correct. After I copy all triggers to the new map, they work as they should without any changes, but when I copy them back to the old map, they're bugged again. When I have workin' spell in the map, I still can't make next one, 'cause it's broken and doesn't run. I have no idea what's goin' on :goblin_jawdrop:.
    I would be grateful for help.

    PS: cast trigger is bugged both in 'test map' option and when I open map from the game. I have the latest version of the original Warcraft.
     
  2. RobertMKD

    RobertMKD

    Joined:
    Jan 23, 2015
    Messages:
    787
    Resources:
    1
    Maps:
    1
    Resources:
    1
    There's a problem outside of the trigger, since it works on other map, try searching something in object editor or other things that may affect the spell, I can't help you more cause I'm limited with information, I also recommend you sharing your trigger with us.
     
  3. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    Triggers and data in object editor are exacly the same. Here is the bugged map:
    View attachment ShadowImageTest.w3x
    And here is workin' one:
    View attachment ShadowImageCorrect.w3x
    I copied all object data and all spell triggers. Additional trigger in first map doesn't affect the spell, and it's bugged even when I delete it. As for cast trigger, here it is:
    • SICast
      • Events
        • Unit - A unit starts an effect of an ability
      • Conditions
        • (Ability being cast) Equals to SI_Spell
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • SI_Index[0] Equals to 0
          • Then - Actions
            • Trigger - Turn on SILoop <gen>
          • Else - Actions
            • Do nothing
        • Set SI_Index[0] = (SI_Index[0] + 1)
        • Set SI_Index[1] = (SI_Index[1] + 1)
        • Set SI_Caster[SI_Index[1]] = (Triggering unit)
        • Set SI_Duration[SI_Index[1]] = SI_Time
        • Set SI_CasterLocation = (Position of SI_Caster[SI_Index[1]])
        • Unit - Create 1 (Unit-type of SI_Caster[SI_Index[1]]) for (Owner of SI_Caster[SI_Index[1]]) at SI_CasterLocation facing Default building orientation degrees
        • Set SI_Unit[SI_Index[1]] = (Last created unit)
        • Unit - Turn off supply usage for SI_Unit[SI_Index[1]]
        • Unit - Set SI_Unit[SI_Index[1]] movement speed to ((Default movement speed of SI_Unit[SI_Index[1]]) x SI_UnitSpeedMultiplier)
        • -------- Removes Attack --------
        • Unit - Add NoAttack(SI) to SI_Unit[SI_Index[1]]
        • -------- Custom Value for turning off abilities --------
        • Unit - Set the custom value of SI_Unit[SI_Index[1]] to 2
        • Animtion - Change SI_Unit[SI_Index[1]]'s vertex coloring to (SI_Red%, SI_Green%, SI_Blue%) with SI_Transparency% transparency
        • Unit - Turn collision for SI_Unit[SI_Index[1]] WyĹ‚.
        • Unit - Remove SI_Spell from SI_Unit[SI_Index[1]]
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • IfInvisible Equals to 1
          • Then - Actions
            • Unit - Add Ghost to SI_Unit[SI_Index[2]]
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • IfImmortal Equals to 1
          • Then - Actions
            • Unit - Make SI_Unit[SI_Index[2]] Indestructible
          • Else - Actions
        • Custom script: call RemoveLocation(udg_SI_CasterLocation)

    Trigger doesn't run in the first map even after I delete conditions. I hope I translated it correctly.
     
  4. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    Bump ;-)
     
  5. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,497
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Well after some testing, I've deemed this Map to be a spawn from the devil. No trigger functions work and I have no idea why. I created a new trigger with the event of Map Init that would display text "Test", and it wasn't displaying.
     
  6. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    That's weird. So my WE kills map, and I don't even know why. Same thing happen on my pirate WE (I have both original and pirate, and pirate is copy of my friend's warcraft, not my), so it's maybe sth with my computer.
     
  7. Shadow Fury

    Shadow Fury

    Joined:
    Nov 4, 2013
    Messages:
    1,630
    Resources:
    4
    Maps:
    3
    Template:
    1
    Resources:
    4
    I had similar problems with dynamic indexing. When I copied the trigger exactly as the tutorial said, all trigges would not work. I had even put "Map Initialization" and in the actions "Display Message" but it didn't work X_X
    Such a simple trigger that refuses to work because I did the dynamic indexing in another one...
     
  8. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    I hope someone managed to fix it, or there is the way around that. I've seen people using dynamic indexing, there has to be solution.
     
  9. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Does the trigger not run at all?
    I mean there is no response from the event without conditions nor actions (except a display text)?
    In that case, your map initialization has an OP limit.
    You probably have some systems in JASS that have a lot of registration on map init which breaks your entire operation number.
    You have to remove or replace that registry.
     
  10. Shadow Fury

    Shadow Fury

    Joined:
    Nov 4, 2013
    Messages:
    1,630
    Resources:
    4
    Maps:
    3
    Template:
    1
    Resources:
    4
    In my case there was just Map Initialization and the two triggers for dynamic indexing (cast and loop). I've put an action in the map initialization trigger to display a message but it didn't work.
     
  11. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    Exactly the same here. You can check on maps I attached to one of my previous posts
     
  12. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    Bump ;-)
     
  13. SAUS

    SAUS

    Joined:
    May 22, 2015
    Messages:
    1,050
    Resources:
    0
    Resources:
    0
    The issue is most likely what Wietlol has mentioned.

    Too much stuff happens during the map initialisation and it hits a limit for operations. This means it literally just stops doing anything. What isn't as obvious with GUI triggers is that they also add extra work at map initialisation. The code to build the triggers is run. They are always run at the end of the main map initialisation function, so if it hits an operation limit, your triggers will not be created and appear to not work at all.

    The fix could be as easy as shrinking how big your arrays are. Are there large arrays in your variable list? Something like in the thousands for a few variables and I broke my whole map. Shrunk them to 100s and it fixed it (turns out you don't need to set the size, though, but that is not important here).

    Do you have big arrays like this?
     
  14. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    O PLEASE!!!

    Go to your global variables and change the ******* size of your arrays to 8191 and NOT 8192.
    Better yet, dont make the size at all. Just keep it 0.
     
  15. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    It doesn't work with 8191, but after changing it to 1 (can't change to 0) triggers are unlocked. Thanks for help.

    PS: What does array size do at all?
     
  16. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    It only sets the default values to the stuff in the array.
    So if you want to start with all values be set to 12345 (for example), then you have to set the default value to 12345 and the size to whatever size you want that has that as default value.

    If you dont care about the default value, you just set the size to 0 or 1 because it doesnt actually affect the size of the array.
    JASS arrays are always 8191 big.
     
  17. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,889
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    ONLY 1 USE:

    If you have either Timer or Dialog arrays, it DOES something. Let me explain.

    In WC 3 we don't have a function to "Create" a timer or a Dialog, they initialize in Variable Manager. WE doesn't know However how many Timers/Dialogs will be used; so it looks at the Array size and Creates those Many + 1 Timers/Dialogs.