• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

No damage (Trigger Spell) SOLVED

Status
Not open for further replies.
Level 4
Joined
May 21, 2015
Messages
70
please help my trigger doesn't do damage.

>

  • Strike Blow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Strike Blow
    • Actions
      • Set StrikeCaster = (Casting unit)
      • Set StrikeTarget = (Target unit of ability being cast)
      • Set CritChance[(Player number of (Owner of StrikeCaster))] = (Random real number between 0.00 and 100.00)
      • Set Damage[(Player number of (Owner of StrikeCaster))] = (1.78 x (Real((Agility of StrikeCaster (Include bonuses)))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CritChance[(Player number of (Owner of StrikeCaster))] Greater than StatsPhysicalDamageCritChance[(Player number of (Owner of StrikeCaster))]
        • Then - Actions
          • Sound - Play MetalHeavySliceMetal1 <gen>
          • Unit - Cause StrikeCaster to damage StrikeTarget, dealing (((Damage[(Player number of (Owner of StrikeCaster))] + (Damage[(Player number of (Owner of StrikeCaster))] x StatsPhysicalDamageIncrease[(Player number of (Owner of StrikeCaster))])) - (Damage[(Player number of (Owner of StrikeCaster))] x StatsPhysicalDamage damage of attack type Spells and damage type Enhanced
        • Else - Actions
          • Set Damage[(Player number of (Owner of StrikeCaster))] = 0.00
          • Set StrikeCaster = No unit
          • Set StrikeTarget = No unit
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CritChance[(Player number of (Owner of StrikeCaster))] Less than or equal to StatsPhysicalDamageCritChance[(Player number of (Owner of StrikeCaster))]
        • Then - Actions
          • Sound - Play MetalHeavySliceMetal1 <gen>
          • Unit - Cause StrikeCaster to damage StrikeTarget, dealing (((Damage[(Player number of (Owner of StrikeCaster))] + (Damage[(Player number of (Owner of StrikeCaster))] x StatsPhysicalDamageIncrease[(Player number of (Owner of StrikeCaster))])) - (Damage[(Player number of (Owner of StrikeCaster))] x StatsPhysicalDamage damage of attack type Spells and damage type Enhanced
        • Else - Actions
          • Set Damage[(Player number of (Owner of StrikeCaster))] = 0.00
          • Set StrikeCaster = No unit
          • Set StrikeTarget = No unit
 
Last edited:
Level 8
Joined
Jan 28, 2016
Messages
486
You're trigger looks fine from what I can tell. Is there a possibility that the StatsPhysicalDamageIncrease or StatsPhysicalDamage variables are too small or too large? For example:
  • Damage[(Player number of (Owner of StrikeCaster))] = 100
  • StatsPhysicalDamageIncrease[(Player number of (Owner of StrikeCaster))] = 0.5
  • StatsPhysicalDamage = 1.5
Therefore:
Damage dealt = (100 + 100*0.5) - (100*1.5) = 150 - 150 = 0
 
Level 4
Joined
May 21, 2015
Messages
70
Dehua_Barbuya

- the "Damage[Index]" variable changes according to the hero's attribute
- "StatsPhysicalDamageIncrease[Index]" its value is 0
- there is no "StatsPhysicalDamage" its "StatsPhysicalDamageReduce" i don't know what happened to the code.

also my base ability is channel with id firebolt, i have remove all effects on the base ability so i think its on the base spell.

and also it will no go down to 0 damage because the agility on my hero is 13 therefore,

[13 + 13(0)] - 13(0) = 13

tested it with footman with 420 hp but no damage at all
, is "damage" an integer or real?
 
Last edited:
Level 4
Joined
May 21, 2015
Messages
70
maaaaaaaaaaaaaan the problem is on the base spell , custom channel needs some effects on the "Art - Target" line to trigger this one . i appreciate all the help thank you :D
 
Status
Not open for further replies.
Top