Odd bug when casting Death and Decay at a point that's used later in the same trigger

Marsmallos

Member
Reaction score
17
Hello!
I am creating a trigger and I'm getting what seems like a really annoying bug. Could somebody take a look at it and help me figure out what's wrong/how to solve it? (more detailed description below)

Trigger:
  • Freezing Trap freeze
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Freezing Trap
    • Actions
      • Game - Display to (All players) the text: Debug: Mine exploded
      • -------- create the AoE effect and slow --------
      • Set GEN_TEMP_POINT[1] = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at GEN_TEMP_POINT[1] facing Default building facing degrees
      • Unit - Add a 15.00 second Generic expiration timer to (Last created unit)
      • Unit - Add (Hunter) Freezing trap slow to (Last created unit)
      • Unit - Add (Hunter) Freezing trap visual effect to (Last created unit)
      • Unit - Order (Last created unit) to Undead Lich - Death And Decay GEN_TEMP_POINT[1]
      • -------- loop through all nearby units to find the closest one --------
      • Set GEN_TEMP_GROUP_single = (Units within 500.00 of GEN_TEMP_POINT[1] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Set HHUNTER_Trap_distance = 500.00
      • Game - Display to (All players) the text: Debug: Does this pa...
      • Game - Display to (All players) the text: (String((Number of units in GEN_TEMP_GROUP_single)))
      • Game - Display to (All players) the text: (String(HHUNTER_Trap_distance))
      • Unit Group - Pick every unit in GEN_TEMP_GROUP_single and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: Debug: loop
          • Set GEN_TEMP_POINT[2] = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between GEN_TEMP_POINT[1] and GEN_TEMP_POINT[2]) Less than or equal to HHUNTER_Trap_distance
            • Then - Actions
              • Set HHUNTER_Trap_freezetarget = (Picked unit)
              • Set HHUNTER_Trap_distance = (Distance between GEN_TEMP_POINT[1] and GEN_TEMP_POINT[2])
            • Else - Actions
          • Custom script: call RemoveLocation(udg_GEN_TEMP_POINT[2])
      • -------- create another dummy to stun the closest target --------
      • Set GEN_TEMP_POINT_single = (Position of HHUNTER_Trap_freezetarget)
      • Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at GEN_TEMP_POINT_single facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add (Hunter) Freezing Trap stun to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt HHUNTER_Trap_freezetarget
      • Game - Display to (All players) the text: Debug: Does this pa...
      • Custom script: call DestroyGroup(udg_GEN_TEMP_GROUP_single)
      • Custom script: call RemoveLocation(udg_GEN_TEMP_POINT_single)
      • Custom script: call RemoveLocation(udg_GEN_TEMP_POINT[1])


For some reason its a single spellcasting action that breaks the trigger:

Trigger:
  • Unit - Order (Last created unit) to Undead Lich - Death And Decay GEN_TEMP_POINT[1]


If this action is enabled, the game seems to forget about what/where GEN_TEMP_POINT[1] is and thus it doesn't put any units into GEN_TEMP_GROUP_single (but Death and Decay is successfully cast I might add), and if I disable it, it creates the dummies, runs the loop and does the stun just fine. In other words, if the Death and Decay action is disabled everything else in the trigger runs perfectly, and if its enabled the game doesn't run the unit group loop (nor create the second dummy caster, whose creation is dependant on the loop). Wtf?
 

UndeadDragon

Super Moderator
Reaction score
447
Remove Custom script: call RemoveLocation(udg_GEN_TEMP_POINT[1]).

You destroy the location, which is why it "forgets" it.
 

Marsmallos

Member
Reaction score
17
Remove Custom script: call RemoveLocation(udg_GEN_TEMP_POINT[1]).

You destroy the location, which is why it "forgets" it.

But unless I'm very much mistaken, I only destroy udg_GEN_TEMP_POINT[1] at the end of the trigger when it is no longer needed, not between these:

Trigger:
  • Actions
    • Unit - Order (Last created unit) to Undead Lich - Death And Decay GEN_TEMP_POINT[1]
    • -------- loop through all nearby units to find the closest one --------
    • Set GEN_TEMP_GROUP_single = (Units within 500.00 of GEN_TEMP_POINT[1] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))


It's between these actions that the game forgets about GEN_TEMP_POINT[1], causing the "Set GEN_TEMP_GROUP_single" action to fail, UNLESS, that is, I disable "Unit - Order (Last created unit) to Undead Lich - Death And Decay GEN_TEMP_POINT[1]"
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
because it is destroyed before the cast is made, it still has not casted on the point if it is out of range or not done casting

just spittballing
 

Marsmallos

Member
Reaction score
17
because it is destroyed before the cast is made, it still has not casted on the point if it is out of range or not done casting

just spittballing

Thanks for your reply!
Could you highlight what actions in the trigger is destroying the point before the trigger is finished? The ability is cast directly below the dummy so range is not an issue (especially as the dummy successfully casts if the action is enabled, however, this breaks the looping through units in range of the point used for the cast) and its cast backswing and cast point are both 0.00 so the ability is cast instantly.
 

keychup

Active Member
Reaction score
34
Before going into all that try this:
Trigger:
  • Unit Group - Pick every unit in GEN_TEMP_GROUP_single and do (Actions)
    • Loop - Actions
    • Game - Display to (All players) the text: Debug: loop
    • Set GEN_TEMP_POINT_single = (Position of Picked Unit)
    • Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at GEN_TEMP_POINT_single facing Default building facing degrees
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
    • Unit - Add (Hunter) Freezing Trap stun to (Last created unit)
    • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Picked Unit
    • Custom script: call RemoveLocation(udg_GEN_TEMP_POINT_single)


Your basicly including the remainng actions to the Pick all Units in Unit Group Loop

EDIT: You dont need to store the picked unit in a variable so i replaced it with just picked unit
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
what i was thinking before was wrong, u cant storm bolt a point, only a unit, try basing an ability off a ground targeting ability and add the affects, maybe acid bomb or something of that sort
 

Marsmallos

Member
Reaction score
17
Before going into all that try this:
Trigger:
  • Unit Group - Pick every unit in GEN_TEMP_GROUP_single and do (Actions)
    • Loop - Actions
    • Game - Display to (All players) the text: Debug: loop
    • Set GEN_TEMP_POINT_single = (Position of Picked Unit)
    • Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at GEN_TEMP_POINT_single facing Default building facing degrees
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
    • Unit - Add (Hunter) Freezing Trap stun to (Last created unit)
    • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Picked Unit
    • Custom script: call RemoveLocation(udg_GEN_TEMP_POINT_single)


Your basicly including the remainng actions to the Pick all Units in Unit Group Loop

EDIT: You dont need to store the picked unit in a variable so i replaced it with just picked unit

Thanks for your reply!
Won't this stun every unit in GEN_TEMP_GROUP_single? The point of the loop is to find the target closest to the trap. And if it fails to create the unit group it won't fire the loop no matter what actions you put in the loop, right? :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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