Chain Frost Spell Problem

Igor_Z

You can change this now in User CP.
Reaction score
61
I got a problem with the triggers for the Chain Frost spell. Can you tell me what is wrong with them. When my hero casts the spell it instantly kills the Bouncing Glaive which means there is something wrong with the second if/then/else action in my second trigger. Thank you for your time

Triggers:

Trigger:
  • Bouncing Glaive Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bouncing Glaive
    • Actions
      • -------- set up variables --------
      • Set BG_Caster = (Triggering unit)
      • Set BG_Target = (Target unit of ability being cast)
      • Set BG_Speed = 50.00
      • Set BG_Level = (Level of Bouncing Glaive for BG_Caster)
      • Set BG_Loc = (Position of BG_Caster)
      • Set BG_Max_Jumps = (3 + BG_Level)
      • -------- creating dummy --------
      • Unit - Create 1 Bouncing Glaive for (Owner of BG_Caster) at BG_Loc facing (Facing of BG_Caster) degrees
      • Set BG_Glaive = (Last created unit)
      • -------- add dummy ability to dummy --------
      • Unit - Add Bouncing Glaive (Dummy Cast) to BG_Glaive
      • Unit - Set level of Bouncing Glaive (Dummy Cast) for BG_Glaive to BG_Level
      • -------- set fly height --------
      • Unit - Add Crow Form to BG_Glaive
      • Unit - Remove Crow Form from BG_Glaive
      • Animation - Change BG_Glaive flying height to 60.00 at 0.00
      • Custom script: call RemoveLocation(udg_BG_Loc)
      • Trigger - Turn on Bouncing Glaive Timed <gen>


Trigger:
  • Bouncing Glaive Timed
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set BG_Loc = (Position of BG_Glaive)
      • Set BG_Loc2 = (Position of BG_Target)
      • Set BG_Real = (Distance between BG_Loc and BG_Loc2)
      • -------- check the distance betwen target and dummy --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BG_Real Less than or equal to 50.00
        • Then - Actions
          • -------- check some condition: target is alive, not immune and visible => order dummy to cast FrostNova onto it. --------
          • -------- or if your dummy's cast isn't fast enough and you got bug, create another dummy to cast the Frost Nova instead --------
          • Unit - Create 1 Bouncing Glaive Dummy for (Owner of BG_Caster) at BG_Loc2 facing (Facing of BG_Caster) degrees
          • Set BG_Dummy2 = (Last created unit)
          • Unit - Add a 1.00 second Generic expiration timer to BG_Dummy2
          • Unit - Add Bouncing Glaive (Dummy Cast) to BG_Dummy2
          • Unit - Set level of Bouncing Glaive (Dummy Cast) for BG_Dummy2 to (Level of Bouncing Glaive (Dummy Cast) for BG_Glaive)
          • Unit - Order BG_Dummy2 to Undead Lich - Frost Nova BG_Target
          • -------- pick a new target --------
          • Set BG_Group = (Units within 600.00 of BG_Loc2 matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to BG_Target)) and ((((Matchin
          • Set BG_Target = (Random unit from BG_Group)
          • Unit Group - Add BG_Target to BG_Affected
          • Set BG_Num_of_Units = (Number of units in BG_Group)
          • -------- decrease the number of jump --------
          • Set BG_Max_Jumps = (BG_Max_Jumps - 1)
          • Custom script: call DestroyGroup(udg_BG_Group)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_BG_Loc2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • BG_Max_Jumps Equal to 0
              • BG_Target Equal to No unit
              • BG_Num_of_Units Equal to 0
        • Then - Actions
          • -------- stop ! --------
          • Custom script: call RemoveLocation(udg_BG_Loc)
          • Unit - Kill BG_Glaive
          • Unit Group - Remove all units from BG_Affected
          • Trigger - Turn off (This trigger)
          • Skip remaining actions
        • Else - Actions
      • -------- move the dummy towards the target --------
      • Set BG_Loc2 = (Position of BG_Target)
      • Set BG_Real = (Angle from BG_Loc to BG_Loc2)
      • Custom script: call RemoveLocation(udg_BG_Loc2)
      • Set BG_Loc2 = (BG_Loc offset by BG_Speed towards BG_Real degrees)
      • Unit - Move BG_Glaive instantly to BG_Loc2, facing BG_Real degrees
      • Custom script: call RemoveLocation(udg_BG_Loc)
      • Custom script: call RemoveLocation(udg_BG_Loc2)
      • -------- if there is no target left or the number of jump has reached 0 --------
 

feelingparty

New Member
Reaction score
3
The problem might come from the fact that you're using globals and they could get overwritten. I read the triggers trough and didn't find anything unlogical. Why don't you try storing the values which you take from trigger to trigger in a hashtable?
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Nevermind the hashtables. Don't want MUI, don't need MUI. I can't figure out a way to fix this
 

Bogrim

y hello thar
Reaction score
154
There may be something wrong with the conditions in the set unit group action, but I can't tell because you cut out some of the conditions. Use in-game text to display the values of the variables in your "or" conditions and see which variable isn't getting the right value, then fix it.

Edit: I think I see the problem. You don't add the target unit to the unit group you use to check which targets are in range, so the unit group starts out at 0. If the initial casting distance is greater than 50, then the trigger will not attempt to find any available targets either. With other words, "BG_Num_of_Units" is most likely always 0 and therefore your dummy unit is killed instantaneously. That's just a guess though.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Yeah. You got a point there. That is true. When I remove the BG_Num_of_Units variable the spell works perfectly(but hits same units also) but I want the trigger to check whether there are targets that haven't been hit... It's not that much of a problem but I want the spell to run like that. What do you suggest me to do? I wanna fix this as soon as possible. I'll play with the trigger a bit and see if I can make it work
 
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

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top