Problem with Damage Trigger

Status
Not open for further replies.
Level 2
Joined
Nov 21, 2010
Messages
29
Hey Guys :),

I've got a little problem with my following spell. The damage wont trigger and the special effect neither. Would be nice if you guys spot the problem :)
Here's the trigger:
  • Burning Intelligence
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Burning Intelligence
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Ability being cast) for (Triggering unit)) Equal to 1
        • Then - Actions
          • Set BI_LVL = 1.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of (Ability being cast) for (Triggering unit)) Equal to 2
            • Then - Actions
              • Set BI_LVL = 2.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Ability being cast) for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Set BI_LVL = 3.00
                • Else - Actions
      • Unit - Cause (Casting unit) to damage (Targeted unit), dealing ((0.50 x BI_LVL) x ((Max mana of (Target unit of ability being cast)) - (Mana of (Target unit of ability being cast)))) damage of attack type Spells and damage type Universal
      • Special Effect - Create a special effect attached to the orgin of (Target unit of ability being cast) using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the orgin of (Target unit of ability being cast) using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
      • Special Effect - Destroy (Last created special effect)
(Yeah, i know, part about the level check is probebly longer than it should/could be, but i think this is easier to check n stuff)


Based the spell of Storm Bolt.


Thanks!

Baskey.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
A good advice: before posting any trigger-related problem on the hive, first check it with some debug messages.
Remove the condition and put inside an If-Then-Else (ITE), if the casting ability is [your ability], show "init true", else show "init false".
Then show Integer(Level of (ability)), show Real(damage), the unit names of casting/targeted unit etc.
(All this with simple game messages).

If you add up all that data, you can easily filter the source of the problem (and it really doesn't cost much time).
If you still can't find anything (or you could narrow down the problem but don't know what's causing it), then you can post it here :D

Debugging triggers like this is crucial to mapping... you'll learn a lot from it ^^
 
Level 2
Joined
Nov 21, 2010
Messages
29
Did that, problem is in the damage (And the special effect are not created either). I also have this with another spell i have in this map, but strangely enough it DID work in the map i transfered it from (and i didnt change anything to the trigger). Is there some sort of game option that stops this from doing (Lol, i know, that sound really stupid).

Still thanks for your help, it helped me a bit..

Baskey.
 
Level 8
Joined
Oct 31, 2010
Messages
238
Does the enemy actually have MP?

Btw the trigger can be shortened to:
  • Actions
    • Set BI_LVL = (Real((Level of Burning Intelligience for (Triggering unit))))
ERROR:
  • Unit - Cause (Casting unit) to damage (Targeted unit), dealing ((0.50 x BI_LVL) x ((Max mana of (Target unit of ability being cast)) - (Mana of (Target unit of ability being cast)))) damage of attack type Spells and damage type Universal
You use damage
Code:
(Targeted unit)
which is WRONG. For spells, you use
Code:
(Target unit of ability being cast)
instead.


The special effect
Code:
Abilities\Spells\Undead\ReplenishMana\ReplenishManaCaster.mdl
did not show because it has animations birth/death.
Since this is so, and you
  • Special Effect - Destroy (Last created special effect)
, you just destroyed the effect immediately after it is spawn (showing the birth animation)

For
Code:
Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
it should show.

Then, is it the correct ability?
Try to debug the trigger yourself, like what ap0calypse had said.
 
Level 2
Joined
Nov 21, 2010
Messages
29
EDIT: Whoops, animation and target stuff were really dumb mistakes XD

But still no damage, wich sucks.

BTW, how do you do the real level thing? Cant find it under any of the options :(

Grtz Baskey
 
Last edited:
Status
Not open for further replies.
Top