A trigger that becomes disabled

CBBPhoenix

New Member
Reaction score
1
Hi everyone

Why does WE disable this trigger?

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Armor of Agathys
      • (Level of (Ability being cast) for (Casting unit)) Equal to 1
    • Actions
      • Set frostarmorcaster = (Casting unit)
      • Hero - Create armor of agathys and give it to frostarmorcaster
      • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
      • Set deatheffect = (Last created special effect)
      • Wait 1.00 seconds
      • Special Effect - Destroy deatheffect
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (frostarmorcaster is alive) Equal to True
      • Then - Actions
        • Hero - Create armor of agathys and give it to frostarmorcaster
        • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
        • Set deatheffect = (Last created special effect)
        • Wait 1.00 seconds
        • Special Effect - Destroy deatheffect
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (frostarmorcaster is alive) Equal to True
          • Then - Actions
            • Hero - Create armor of agathys and give it to frostarmorcaster
            • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
            • Set deatheffect = (Last created special effect)
            • Wait 1.00 seconds
            • Special Effect - Destroy deatheffect
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (frostarmorcaster is alive) Equal to True
              • Then - Actions
                • Hero - Create armor of agathys and give it to frostarmorcaster
                • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
                • Set deatheffect = (Last created special effect)
                • Wait 1.00 seconds
                • Special Effect - Destroy deatheffect
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (frostarmorcaster is alive) Equal to True
                  • Then - Actions
                    • Hero - Create armor of agathys and give it to frostarmorcaster
                    • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
                    • Set deatheffect = (Last created special effect)
                    • Wait 1.00 seconds
                    • Special Effect - Destroy deatheffect
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (frostarmorcaster is alive) Equal to True
                      • Then - Actions
                        • Hero - Create armor of agathys and give it to frostarmorcaster
                        • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
                        • Set deatheffect = (Last created special effect)
                        • Wait 1.00 seconds
                        • Special Effect - Destroy deatheffect


These If/Then/Else conditions are repeated 29 times (!) so I just showed some of them. Else function for all of them is "Do nothing".

I use it in my map for a hero who should have a powerup every 1 second as long as he is alive and has a buff from an ability. The point is that it should work as if he gets an additional buff from using his ability, and the 1 second thing is for stopping dispel (so that it will reappear in at most 1 second until the end of the ability which lasts 30 seconds)

Hope someone can tell me why World Editor wont allow me to use these triggers. :confused:
 

HydraRancher

Truth begins in lies
Reaction score
197
Can I first tell you how USELESS that pyramid is? the If runs so many times, you'd be better off doing stacking it all into a big block. Also, tell us, what does it say exactly?
 

CBBPhoenix

New Member
Reaction score
1
Heh

Ya I know it's nub style. But after all I am nub at mapmaking.. But what do you mean by "what does it say"?
 

Galdiuz

Creator of Photon Command
Reaction score
98
Try this. (It's freehand)
Trigger:
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Armor of Agathys
      • (Level of (Ability being cast) for (Casting unit)) Equal to 1
    • Actions
      • Set frostarmorcaster = (Casting unit)
      • For each integer A from 1 to 30 do actions
        • If/Then/Else
          • If
            • (frostarmorcaster is alive) Equal to True
          • Then
            • Hero - Create armor of agathys and give it to frostarmorcaster
            • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
            • Special Effect - Destroy (Last created special effect)
            • Wait 1.00 seconds
          • Else
 

Varoze

New Member
Reaction score
0
Am I the only one wondering how the hero's going to get room for those 30 items being given to him? How about destroying the item for each loop?

But yeah,yours is ALOT more effective, Galdiuz, I was going to post that too, but you beat me too it (stupid slow registration e-mail :banghead:)
:)
 

CBBPhoenix

New Member
Reaction score
1
Oops

You're right Varoze: I forgot to say: the item is a powerup that becomes used as soon as equipped. :p
To Galdiuz: Gonna try that. :) .Why does it work btw? Does the WE know that these integers from 1 to 30 are seconds? :confused:
 

Moridin

Snow Leopard
Reaction score
144
Does the WE know that these integers from 1 to 30 are seconds?

Nope it doesn't. When executed it's pretty much instantaneous IF it were not for the "wait 1.00 seconds" it executes each time it runs the loop :p.
 

CBBPhoenix

New Member
Reaction score
1
Aha..

Nope it doesn't. When executed it's pretty much instantaneous IF it were not for the "wait 1.00 seconds" it executes each time it runs the loop :p.

And the 30 thing is just to make it run 30 times?
Sometimes those trigger functions sound a lot more difficult than they are :p

I have tried this trigger:
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Armor of Agathys
      • (Level of (Ability being cast) for (Casting unit)) Equal to 1
    • Actions
      • Set frostarmorcaster = (Casting unit)
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (frostarmorcaster is alive) Equal to True
            • Then - Actions
              • Hero - Create armor of agathys and give it to frostarmorcaster
              • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
              • Set deatheffect = (Last created special effect)
              • Wait 0.50 seconds
              • Special Effect - Destroy deatheffect
              • Wait 0.50 seconds
            • Else - Actions
              • Do nothing
and it doesn't work :( it couldn't possibly be the extra wait before "remove special effect" could it?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I'd say it simply is any wait you put inside an Integer loop...

I'd suggest you using Hashtables here...
And then, use a different trigger with a periodic (1 second) event, and read this and use that "Healing" trigger's concept of removing 1 from the hash, and when it becomes 0 (Set it to 30 at the start) clear it ;)

Though I can't seem to really get the hang of them (In GUI at least :p) so can't really help you there, but hopefully you can :D
 

CBBPhoenix

New Member
Reaction score
1
I'm sorry

Well I am too inexperienced to use that. I don't even have a clue when it comes to arrays. Don't know what it is and I can't use them at all. So maybe this is just too hard to make for me... There is no other way that you can tempoarily increase armor of a unit and create a special effect that stays on the unit until it dies or for 30 seconds?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
There is no other way that you can tempoarily increase armor of a unit and create a special effect that stays on the unit until it dies or for 30 seconds?
Um...modify the Roar ability and set targets to only Self? No triggers needed...
 

CBBPhoenix

New Member
Reaction score
1
Yes I know hehe. but the problem is that if dispelled, a new buff should appear. And I cannot make the death and decay (effect) stay on a unit unless I use the Create Special effect at Unit action.
 

Lifespiker

New Member
Reaction score
1
This might not work, BUT:
You could always make a (real) variable and make the trigger be a 1 second periodic event. Everytime it runs have it do (set var = var - 1). Have a second trigger where the event is that the value of real var = 0 and its action is to turn off the other trigger and reset the varible to 30.

Lifespiker
 

Moridin

Snow Leopard
Reaction score
144
Your trigger:

Trigger:
  • Trigger
    • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Armor of Agathys
      • (Level of (Ability being cast) for (Casting unit)) Equal to 1
    • Actions
      • Set frostarmorcaster = (Casting unit)
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (frostarmorcaster is alive) Equal to True
            • Then - Actions
              • Hero - Create armor of agathys and give it to frostarmorcaster
              • Special Effect - Create a special effect attached to the chest of frostarmorcaster using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
              • Set deatheffect = (Last created special effect)
              • Wait 0.50 seconds
              • Special Effect - Destroy deatheffect
              • Wait 0.50 seconds
            • Else - Actions
              • Do nothing


..should run perfectly fine. However, you can try removing the "DO nothing" as it's known to cause bugs on occasion and is completely useless..

Also note that this spell cannot be cast by more than one unit at a time...as the variables will get overwritten by new data every time the spell is cast.
 

Laiev

Hey Listen!!
Reaction score
188
If i remember well, wait inside loop cause bug and/or don't work...

You don't need to wait 1/2 second to destroy a special effect, you can save it in hashtable or destroy it without any time, have no problem

EDIT: why you put that loop if you don't use it? lol

don't understand, just to create special effect?
lol just do it with periodic trigger, make it MUI or MPI at least.
 

CBBPhoenix

New Member
Reaction score
1
To Moridin: Yeah I thought it ought to work perfectly too. I will try to remove the Do nothing action and test again. Else I actually thought of something simple yesterday: Just create a dummy unit at center of playable map area when Armor of Agathys is cast. The dummy should have a 99999 range aura that gives armor (auras are indispellable) and targets allowed should be "Hero, player units" And then just add a 30 sec generic exp timer to that dummy lol. Don't know about the special effects though, might try the aura target (that is normally that cyan ring attached to "origin").

to Laiev: I want to avoid periodic triggers as far as possible, pretty sure they make the game laggy when the map is crowded with units (My map is a footmen frenzy inspired one so 3 groups of units per player: 36 X 12, wouldn't be uncommon). You might be right about wait in loops, actually think I heard someone say that somewhere else on Thehelper.net.
I created the loop because I would like to give an armor bonus to the caster and then if dispelled it should re-appear with a delay of at most 1 sec. (so that it would be like a constant effect without adding an ability to the unit because there is no room for tooltip-abilities so it will override active ones). The special effect only appears once unless you create it each second for 30 seconds or until the unit is dead.

Hope that solves something :confused:
 

Laiev

Hey Listen!!
Reaction score
188
Hmm...

You can do it with a periodic trigger 0,5 second... but turn off when effects over, so don't will laggy much how you say
 

CBBPhoenix

New Member
Reaction score
1
I have made it work perfectly now by the dummy unit. I use some crowded trigger that 30 times says: add special effect to VARIABLE(frostarmorcasterr) that variable is defined when the unit casts the ability and on death frostarmorcaster = no unit. so it works hehe. But you're right. good idea to turn off periodic triggers when the are not needed (and then on when they are :p)
 

Laiev

Hey Listen!!
Reaction score
188
Nicee :p

you can change the effect of aura to the model/effect what you want :D so you don't need trigger to special effect
 
General chit-chat
Help Users
  • 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!
  • 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