Two Trigger Problems

Denegoth

New Member
Reaction score
18
Problem 1 SOLVED

Trigger:
  • Catch
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Catch
    • Actions
      • Wait 1.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BeastmasterCaught Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Target unit of ability being cast)) Less than or equal to ((Max life of (Target unit of ability being cast)) / 4.00)
            • Then - Actions
              • Wait 0.10 seconds
              • Unit - Remove (Target unit of ability being cast) from the game
              • Game - Display to (Player group((Owner of (Casting unit)))) the text: (|cff00FF00 + ((Name of (Target unit of ability being cast)) + caught!|r))
              • Set BeastmasterCaught = 1
              • Set BeastmasterUnit = (Unit-type of (Target unit of ability being cast))
              • Unit - Add Release to (Casting unit)
            • Else - Actions
              • Game - Display to (Player group((Owner of (Casting unit)))) the text: |cff00FF00Enemy has...
        • Else - Actions
          • Game - Display to (Player group((Owner of (Casting unit)))) the text: |cff00FF00You alrea...


This trigger used to work perfectly fine, but I changed something (Can't remember what) and now it crashes the map as soon as the spell is used.


Problem 2

Trigger:
  • Release
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Release
    • Actions
      • Set TempLevel = (50.00 + ((Real((Level of Catch for (Casting unit)))) x 50.00))
      • Unit - Create 1 BeastmasterUnit for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Animation - Change (Last created unit)'s size to (TempLevel%, TempLevel%, TempLevel%) of its original size
      • Wait 0.10 seconds
      • Unit - Add Beastmaster Life Bonus to (Last created unit)
      • Unit - Add Beastmaster Damage Bonus to (Last created unit)
      • Wait 0.10 seconds
      • Unit - Set level of Beastmaster Life Bonus for (Last created unit) to (Level of Catch for (Triggering unit))
      • Unit - Set level of Beastmaster Damage Bonus for (Last created unit) to (Level of Catch for (Triggering unit))
      • Set BeastmasterCaught = 0
      • Set BeastmasterUnit = No unit-type
      • Unit - Remove Release from (Casting unit)


Everything in this trigger works fine except the Life Bonus level increasing. The damage bonus works fine, but life bonus just stick at level 1 (+100 health). I have put the levels into the spell, so it isn't that I forgot that.
 

G00dG4m3

New Member
Reaction score
1
instead of /4 in first one, you should do *.25 and if you need a levels, then ((--*25)* Real level of ability being cast), cause its quite dificult to do the / action less and less.
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
For the first one, my best solution for bad triggers (im not saying yours is bad I just mean it causes trouble) is to delete them and re-write them.

For the seconds one, try setting that life bonus to (level of ability x 100), because otherwise it'll just use the level number as the bonus, which is usually only 1 or 2.

But my best solution for trouble triggers is to delete them and make it again, maybe you'll find the problem as you do it. (of course, it's always better to remake a trigger before deleting the original.)

EDIT: Welcome to The Helper, G00dG4m3!!! Hope you have a great time here!
 

roXplosive

New Member
Reaction score
15
My 2 cents : remove the unit from the game AFTER displaying the caster's owner the message right before adding Release ability to the caster . Otherwise it's pretty cool idea .
 

Denegoth

New Member
Reaction score
18
For the first one, my best solution for bad triggers (im not saying yours is bad I just mean it causes trouble) is to delete them and re-write them.

For the seconds one, try setting that life bonus to (level of ability x 100), because otherwise it'll just use the level number as the bonus, which is usually only 1 or 2.

But my best solution for trouble triggers is to delete them and make it again, maybe you'll find the problem as you do it. (of course, it's always better to remake a trigger before deleting the original.)

EDIT: Welcome to The Helper, G00dG4m3!!! Hope you have a great time here!

Catch is a skill the hero uses. The life bonus is a skill that is given to the unit. The life bonus is set to the same level as Catch
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
if live bonus is the item ability it cannot be leveld after given to a unit.
 

Denegoth

New Member
Reaction score
18
if live bonus is the item ability it cannot be leveld after given to a unit.

It is the item ability but I changed it to a unit ability and added levels. The damage bonus was done in the same way and levelled up fine. Is it still a problem?
 

jwallstone

New Member
Reaction score
33
That should be fine then. Some abilities are just quirky, and it's possible that life bonus is just like that.

For Problem 1, you should change Casting Unit to Triggering Unit. I think that might fix it (if not, it'll fix another problem down the line). Casting unit loses the reference to the correct unit after a period of time, i.e. it has a limited lifetime of use. Since you use Waits in your code, you are very likely losing the reference to the unit. Triggering Unit will never lose the reference (it's almost like a local variable), so it is safe to use after waits.
 

Denegoth

New Member
Reaction score
18
It turns out I messed something up in the actual Catch spell. Problem 2 is still around though :(
 

roXplosive

New Member
Reaction score
15
I agree with using variables for Caster and Target units in function 1 . About the crash I still think that the premature use of RemoveUnit() is the cause . I say move that line down just before adding the Release ability to the caster .
 

Denegoth

New Member
Reaction score
18
I agree with using variables for Caster and Target units in function 1 . About the crash I still think that the premature use of RemoveUnit() is the cause . I say move that line down just before adding the Release ability to the caster .

I've changed the trigger to do that now anyway, but I turned off the triggers and it still crashed, then I remade the spell (using Death Coil instead of Forked Lightning)
 

roXplosive

New Member
Reaction score
15
The problem with the second trigger is ? Personally I don't think resetting BeastmasterUnit type is really necessary .

Should this ability catch heroes or magic immunes because I think it might be possible .
 

Denegoth

New Member
Reaction score
18
I got it working!

Trigger:
  • ReleaseHealthBonus
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set LifeBonusAbility[1] = Beastmaster Life Bonus 1
      • Set LifeBonusAbility[2] = Beastmaster Life Bonus 2
      • Set LifeBonusAbility[3] = Beastmaster Life Bonus 3
      • Set LifeBonusAbility[4] = Beastmaster Life Bonus 4
      • Set LifeBonusAbility[5] = Beastmaster Life Bonus 5


Trigger:
  • Unit - Add LifeBonusAbility[(Level of Catch for (Casting unit))] to (Last created unit)
 
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