Help! All triggers stopped working

Togrias

New Member
Reaction score
0
Hi! My map's triggers stopped working for some odd reason! None of them work at all. My map is entirely GUI-based save for a few custom scripts to minimize memory leaks. It does not have many variables. Some arrays are quite large up to 500+ in size, but I'm pretty sure they're nowhere near the limit of 8192(?).

Recently I added a new trigger. It's meant to "detect" and replace all attacks. Whenever a unit attacks another, I give it the ability "Channel" instead and order it to do it, so that I can entirely do up attacks in the form of triggers. This is what I have:

Events
Unit - A unit Is attacked
Conditions
Actions
Unit - Pause (Attacking unit)
Unit - Unpause (Attacking unit)
Unit - Add Channel (Attack) to (Attacking unit)
Unit - Order (Attacking unit) to Special Malganis - Soul Preservation (Attacked unit)

My map also uses many other triggered spells with a rather complicated triggered spell engine (at least for GUI-based maps) but absolutely nothing I know of can actually cause ALL my triggers to stop working, not just newly done triggers. Previously all my triggered spells ran flawlessly.

I tried to fix it on my own. I lowered a newly created array size of 2000+ to 500+, then viola! All triggers functioned normally again. This is quite puzzling as 2000+ is nowhere near the limit either but never mind. Then I made a few edits here and there and my triggers stopped working again! This time I have no idea where to even start fixing it.

Even the simplest debug trigger like this will not work:

Untitled Trigger 003
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Game - Display to (All players) the text: hi

Does anyone out there know of anything that I may have done that can result in some catastrophic failure of all my triggers?
 

rodead

Active Member
Reaction score
42
în your code the unit gets damage i don't know id this is the mean of it but first of all i can't find any problems in the trigger but the pause unpause thingie is a lillte bit to much since you don't need them. i think yur map could be corrupted but if you don't mind post also your other triggers.
 

Togrias

New Member
Reaction score
0
Thanks for the quick replies! Sorry. Here are the triggers in code:

This is one of the triggers I just added.

Code:
Events
Unit - A unit Is attacked
Conditions
Actions
Unit - Pause (Attacking unit)
Unit - Unpause (Attacking unit)
Unit - Add Channel (Attack) to (Attacking unit)
Unit - Order (Attacking unit) to Special Malganis - Soul Preservation (Attacked unit)

This is the sample debug trigger I camp up with to show that all triggers are non-functional.

Code:
Untitled Trigger 003
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Game - Display to (All players) the text: hi

Previously (when my triggers were functioning) my new triggers did what I intended: The attacks actually get prevented and replaced my a "fake attack" which was actually a copy of the Channel ability.

Now at that point in time the Triggers were doing fine. Then I added the following three triggers (a rather rudimentary GUI-version of, and inspired by Vexorian's CSCache system, at least with a similar desired function and purpose to the extent of my map):

This code is added to all instances in existing triggers where I need to store a value (usually custom value and stuff) on a unit:
Code:
                        For each (Integer A) from 0 to 500, do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        DummyBooleanB Equal to False
                                        CacheIsOccupied[CSHeads] Equal to False
                                    Then - Actions
                                        Set DummyBooleanB = True
                                        Set DummyIntegerB = (Integer A)
                                    Else - Actions
                        Set CacheNumber = DummyIntegerB
                        Set CacheIsOccupied[CacheNumber] = True
                        Set CacheUnit[CacheNumber] = (Last created unit)
                        Set CacheCustomVariable[CacheNumber] = DummyIntegerA                        
                        Unit - Set the custom value of (Last created unit) to CacheNumber

Whenever I need to retrieve a unit's custom value I use the following trigger:
Code:
Set DummyIntegerA = CacheCustomVariable[(Custom value of (Triggered unit))]

When a unit dies its slot is no longer needed so I free it up such that another unit may store its custom value in that slot.
Code:
Unit Dies Free up Occupied
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Set CacheNumber = (Custom value of (Dying unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Dying unit) Equal to CacheUnit[CacheNumber]
                CacheIsOccupied[CacheNumber] Equal to True
            Then - Actions
                Set CacheIsOccupied[CacheNumber] = False
            Else - Actions

Previously the array size of 500 was 2500, but then all of the triggers stopped working. So I messed around thinking I have done something seriously wrong, then I reduced the array size to 500 and it started working again.

Then afterwards I implemented the Cache triggers to previously-existing triggers I have and suddenly all triggers stopped working again.

But as far as I know none of these triggers can affect the whole map. Surely my other triggers are not too relevant in causing this as they were working perfectly fine before. Can my map be corrupted? If so how do I fix it? My map opens up fine in Worldedit though.
 

Togrias

New Member
Reaction score
0
Not a lot. Probably 50+? Mostly Trigger spells, as I take at least 3 separate triggers to do a spell.
 

Togrias

New Member
Reaction score
0
I fixed it (temporarily) by globally halving all array sizes. Does anybody know whether the number of arrays affects the map? Also I'm looking for a more permanent solution.
 

Somatic

You can change this now in User CP.
Reaction score
84
IIRC Blizzard's Array have a maximun size, same for Cache, so maybe have afew Cache and a few arrays to lessen the load of a single array and single Cache
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top