• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Something with the ability causes it to trigger twice?

Status
Not open for further replies.
Level 8
Joined
Apr 8, 2009
Messages
499
Hey there fellow hivers,


I've made a very basic spell based on the mountain king's Stormbolt ability.

The hero throws an object at an enemy, stunning it and dealing damage....
The damage is custom triggered, so that it can be manipulated and is influenced by stats.

To have the damage happen once the missile actually hits the target, I used the following trigger:


  • Kunoichi Hidden Weapon
    • Events
      • Conditions
        • (Unit-type of (Damage source)) Equal to Kunoichi
        • (Damage taken) Less than or equal to 1.00
      • Actions
        • Game - Display to (All players) the text: triggered
        • Game - Display to (All players) the text: (actual damage done + (String((Damage taken))))
        • Set Real_Temp = (150.00 + ((Real((Agility of (Damage source) (Include bonuses)))) x (1.50 + (0.05 x (Real((Level of Hidden Weapon [Kunoichi] for (Damage source))))))))
        • Unit - Cause (Damage source) to damage (Triggering unit), dealing Real_Temp damage of attack type Hero and damage type Normal


In a different trigger I add units to the event list - "add to trigger x, event '(picked unit) takes damage)".
The ability being used is set to do 1 damage in the ability editor.

The problem is however, that the trigger runs twice (sometimes even thrice!)
And I haven't the foggiest as to why it would do that.

I have checked all these triggers and i'm 99.99% sure it's not my triggers doing anything wrong.

At this point I'm wondering if the 'stun' buff itself counts as damage being dealt (albeit 0 damage).

Any people who know what's going on?
 
Is ensured that the unit is not registered multiple times at the damage event trigger? Would you mind to post the demo?

I checked the 2 damage event adding triggers specificly and they don't misbehave for any of my other damage event triggers.

Also tried out varying tests, it'll trigger 2-3 times, each doing different amounts of damage.
-1st time = 0 damage
-2st time = 1 damage
-3st time = 0 damage (if there is a 3rd time)

This potentially solves the problem since I can add a condition that the damage has to be above 0, but I'm still confused why it would do this.

---EDIT----:

Also, the amount of times it gets triggered is based on the damage the ability is set to deal in the ability editor.

set to 1 damage = 3 times, set to 1.5 damage = 2 times, set to 2 damage = 0 times.

What the hell right?

---EDIT----:

In hindsight, I can be 100% sure it's not the damage taken events, since if that where the case the damage taken should be the same all the time right?
 
Last edited:
It is because your damage in the action re-trigger the action (event - unit A take damage, in action deal damage to A, and in cycle), but due to unit would have some resistance to damage, so damage dealt will be lesser and lesser until the damage no longer causes trigger to re-fire again (over low damage will round to 0, which doesn't trigger event)

Just turn off the trigger and re-enable it could solve the problem.


EDIT :

Ok I see your trigger wrongly, perhaps a test map with the problem could let the other people have a deeper look into it.
 
Last edited:
It is because your damage in the action re-trigger the action (event - unit A take damage, in action deal damage to A, and in cycle), but due to unit would have some resistance to damage, so damage dealt will be lesser and lesser until the damage no longer causes trigger to re-fire again (over low damage will round to 0, which doesn't trigger event)

Just turn off the trigger and re-enable it could solve the problem.


EDIT :

Ok I see your trigger wrongly, perhaps a test map with the problem could let the other people have a deeper look into it.

Once again, 100% sure it's NOT the trigger.
Hence why I posted it in the world editor section, it's due to the ability's nature, which I don't know too much about :)


Will put up a demo map soon.
 
I have no idea why would it do that, but you could try turning off the trigger and then turning it back on (not sure if you need a "wait" action between off and on). It might be the "dumb" way but it usually works.

EDIT: So just to be sure, the trigger runs more then once even if you turn it off at the end of the effect? (that is without turning it on again)
 
Last edited:
I have no idea why would it do that, but you could try turning off the trigger and then turning it back on (not sure if you need a "wait" action between off and on). It might be the "dumb" way but it usually works.

Tried that, turn off at start, turn on at end, no change, hence my believe that it's inherent to the stormbolt ability
 
Last edited:
Try this: disable whatever lines add new damage events to your trigger (so even when you cast the dummy storm bolt nothing should happen but its tiny damage) and see if you still get multiple damage instances-- if so maybe you have another trigger somewhere messing with yours.

Next I'd try keeping that disabled but placing a couple target units down with the Unit Palette and manually adding the events to the damage detection trigger to see how many times it will fire.
  • Kunoichi Hidden Weapon
    • Events
      • Unit - TestUnit 001 <gen> takes damage
      • Unit - TestUnit 002 <gen> takes damage
 
Try this: disable whatever lines add new damage events to your trigger (so even when you cast the dummy storm bolt nothing should happen but its tiny damage) and see if you still get multiple damage instances-- if so maybe you have another trigger somewhere messing with yours.

Next I'd try keeping that disabled but placing a couple target units down with the Unit Palette and manually adding the events to the damage detection trigger to see how many times it will fire.
  • Kunoichi Hidden Weapon
    • Events
      • Unit - TestUnit 001 <gen> takes damage
      • Unit - TestUnit 002 <gen> takes damage

Result stays the same. if I disable all triggers that add events-- -nothing happens. If I manually add a unit takes damage event, it still runs twice.
Now I'm even more sure it's not a trigger issue :)
Very sure stormbolt FOR SOME REASON "deals" 0 damage, maybe stun buff related.
 
More confirmation that stormbolt is weird as hell---

When the ability's damage is set to 0 in the editor, IT STILL TRIGGERS THE EVENT.

Halp, I'm both 100% confused and annoyed by this :(
 
More confirmation that stormbolt is weird as hell---

When the ability's damage is set to 0 in the editor, IT STILL TRIGGERS THE EVENT.

Halp, I'm both 100% confused and annoyed by this :(
Pretty sure dealing 0 damage always triggers damage events, not just stormbolt.
 
I suggest that you use some kind of workaround for this.

For instance, you could use a Wait (Distance between Unit A and Unit B / speed of the missile), so that the actions will trigger at the correct time.

It's easily doable with just a couple variables, and bypasses the damage detection nonsense.
 
If turning off the trigger at the end causes it to fire only once ( and if your ability isn't MUI, hopefully) then you could try turning off the trigger at the end without turning it on again, instead creating another trigger which turns it on when the unit starts casting the ability. Hopefully with that "down time" between each cast the trigger will only fire once.
 
I suggest that you use some kind of workaround for this.

For instance, you could use a Wait (Distance between Unit A and Unit B / speed of the missile), so that the actions will trigger at the correct time.

It's easily doable with just a couple variables, and bypasses the damage detection nonsense.

Sounds like the best idea so far, will have to try it out :)!


Just wish I knew why stormbolt inherently does damage twice/thrice :(
 
Status
Not open for further replies.
Back
Top