Trigger Firing Twice

jedi8955

New Member
Reaction score
4
I'm having a bloody weird problem with a trigger firing twice in a row. It's a little nothing trigger too, it shouldn't have any trouble. It waits about 1 real time second, then it fires the trigger again. It's the only one I'm having this problem on.

Code is below, explaination follows.

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
      • (I've tested this with Starts the effect and Begins casting an ability, both fire wrong.)
    • Conditions
      • (Ability being cast) Equal to Tinker_Lv1_Test_Positive
    • Actions
      • Unit - Increase level of Tinker_Lv1_DamagePos_Test for (Target unit of ability being cast)


Ability: Tinker_Lv1_Test_Positive
This is a dummy ability based off of Inner Fire. It in and of itself does nothing, it only server to spring the trigger.
Duration: 0
Targets Allowed: Friend, Mechanical, Structure (These match the unit it's to be used on)

Ability: Tinker_Lv1_DamagePos_Test
This is the real ability I'm trying to manipulate. Based off of Trueshot Aura, it increases the unit's damage by a % amount. This ability sits inside a Spell Book.
Targets: Self
Levels: 11 (Level 1 = 0)


So, when I have a unit use the triggering ability, it applies the effect, waits a sec, then applies it again. It's only supposed to apply it once.

I also have a negative version with its own trigger, that dummy ability is based off of Slow. This also fires twice, with the target ability residing in the same spellbook.

There's nothing in my trigger scheme that repeats a trigger, so I have no bloody idea why the hell it's doing this. My only guesses are that it's something to do with the Spell Book or something to do with Trueshot Aura.

Any help would be greatly appreciated. Thanks!
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
My bet would be that slow and innerfire fire the effect event twice - once for the cooldown start and mana consumption and once for the applied buff. But that wouldn't explain why it doesnt work with start casting then.

Is the unit casting slow/innerfire twice? or only once and the trigger fires 2 times?

other than that, there has to be another trigger influencing this. There is nothing wrong with that trigger.

Are you sure your innerfire and slow dummy abilities dont have the same orderstring?
 

jedi8955

New Member
Reaction score
4
My bet would be that slow and innerfire fire the effect event twice - once for the cooldown start and mana consumption and once for the applied buff. But that wouldn't explain why it doesnt work with start casting then.

Is the unit casting slow/innerfire twice? or only once and the trigger fires 2 times?

The unit is only casting it once, it's just that the trigger fires twice.


Make a 2 sec cooldown to stop it from firing twice.


Incompatible with the map design, unfortunatly. Still, if I can't figure this out, I might have to hack this in.

I think its re-casting the spell because the level has changed.

Well, the level of the dummy spell hasn't changed, only the targeted ability.

I have a trigger in game, working that operates similarly. However, it's AoE based and adds a bunch of people to a hashtable, adds them to a unit group and then increases the level of the ability. (It's in a hashtable because it's timer based and needs to be MUI) This is working just fine.

It's got me bloody stumped.



I have a feeling that this is something to do with the targeted ability being in a SpellBook. It might just be inexperience, but I have a weird feeling about it.

I'll have to keep looking. Thanks for your help guys, if you have any more ideas, it'd be appreciated.

_________________________________________________

Edit: Further testing has the initial effect waiting approximatly 1 second after the dummy ability is cast, then applying the effect once, waiting about another second, then applying it again! Bloody weird.

_________________________________________________

Return of the Edit: Here we go. Found something on the googles that might explain some of this rubbish.

http://www.mindflare.com/wc3maps/strange.htm said:
Level of an upgradeable ability in a Spellbook added through triggers is too high

In an earlier patch, upgradeable abilities added through triggers used to not be granted upgrade bonuses properly; I suspect that when they fixed this, they introduced something which gives the bonus to abilities inside Spellbooks more than once, causing them to be a higher level than they should be. You can work around the problem by using the "Unit - Set Level of Ability for Unit" trigger action to set the ability to the proper level after adding the Spellbook.

This is exactly what is happening.

So, it looks like I'll need to get the integer value of the level of the ability being manipulated, set it to a variable, add 1, then set the ability to be equal to the variable. I need to go through all that because I don't know what level the ability will be.


On a completely unrelated note, I'm noticing that after watching an episode of Top Gear, I use a lot of British slang.

_______________________________________

Son of the Edit

And that didn't do a damned thing.

I changed the trigger to be this:

Trigger:
  • TinkerLv1Test Pos
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tinker Lv 1 Test Positive
    • Actions
      • Set Tinkering_Int = ((Level of Tinker_Lv1_DamagePos_Test for (Target unit of ability being cast)) + 1)
      • Unit - Set level of Tinker_Lv1_DamagePos_Test for (Target unit of ability being cast) to Tinkering_Int
      • Set Tinkering_Int = 0


Still takes effect twice. So it's definitly firing the entire trigger twice.

Bleh.

_____________________________________

Edit vs. Mecha-Edit!

So I added Turn Off (This Trigger) to the beginning of it, then Turn On (This Trigger) to the end. Still has double effect.

It has to be reading the spell being used twice. Dunno how else to explain it.

_____________________________________

Crappy American Remake of Edit:

So, I just changed what the dummy was based on to Channel, thinking it had to be something with the Order ID. Same result, applies it twice.

_____________________________________

20th Anniversary Release of Edit:

Kept messing around with it.

Put Turn Off (This Trigger) at the end of it, without turning it back on. Still has double effect.

Found out that it is only increasing the real ability by 1 level (least, by the tooltip), but that the effect is that it's twice.

Let me explain.

The targeted ability is based off of Trueshot Aura and increases damage by 2% per level. It's set to 0 AoE and targets Self only.

After the dummy is used, the unit with the real ability shows its normal damage + 4% in green.

I am thoughly confused and frustrated. I think I'm done for tonight, I'm gonna play some Endless Frontier and bludgeon myself into unconsciousness.
 

jedi8955

New Member
Reaction score
4
Ok, I've gotten this figured out.

This is a bug specifically with Trueshot Aura.

I tried plugging in an ability based off of Devotion Aura into the targeted ability, it showed up just fine.

I'm just going to half all my values based on TS.

Thanks for all the help with this :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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