• 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.

[Trigger] strenght based damage

Status
Not open for further replies.
Level 13
Joined
Oct 27, 2008
Messages
1,176
i'm trying to make a 2nd part of a skill
it does ???? Direct damage than
damage based on the target's strenght
  • Untitled Trigger 009
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Defeat
    • Actions
      • -------- Direct dmg --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Defeat for (Triggering unit)) Equal to 1
        • Then - Actions
          • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
          • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 750.00 damage of attack type Spells and damage type Normal
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Defeat for (Triggering unit)) Equal to 2
            • Then - Actions
              • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 1500.00 damage of attack type Spells and damage type Normal
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
      • -------- dmg per second --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 100
        • Then - Actions
          • Unit - Add Defeat Buff to (Target unit of ability being cast)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 200
            • Then - Actions
              • Unit - Add Defeat Buff 2 to (Target unit of ability being cast)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 300
                • Then - Actions
                  • Unit - Add Defeat Buff 3 to (Target unit of ability being cast)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Strength of (Target unit of ability being cast) (Include bonuses)) Less than or equal to 400
                    • Then - Actions
                      • Unit - Add Defeat Buff 4 to (Target unit of ability being cast)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Strength of (Target unit of ability being cast) (Include bonuses)) Greater than or equal to 401
                        • Then - Actions
                          • Unit - Add Defeat Buff 5 to (Target unit of ability being cast)
                        • Else - Actions
depending on the targets strenght effects with debuff the target gets i'm wondering if that trigger would work right
 
Level 10
Joined
Jun 16, 2007
Messages
415
Quite many unnessecary lines....

  • Actions
    • -------- Direct Damage --------
    • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
    • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (750.00 * (Level of Defeat for (Triggering Unit()))) damage of attack type Spells and damage type Normal
    • Special Effect - Destroy (Last created special effect)
    • -------- Damage Over Time--------
    • -------- This wouldn't work the way you did it, because when you apply a buff to a unit it doesn't actually have any effects--------
However, I will make you a quick JASS script, all you have to do is call it, no need for JASS knowledge:

JASS:
function StrengthDoT takes integer dur, real power returns nothing
    local unit c = GetTriggerUnit()
    local unit t = GetSpellTargetUnit()
    loop
        exitwhen dur == 0
        call UnitDamageTarget(c, t, GetHeroStr(t, true) * power, false, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
        set dur = dur - 1
        call PolledWait(1)
    endloop
    set c = null
    set t = null  
endfunction

This script will deal X damage per second for Y seconds and multiply the X by the strength of the target unit. i.e: If X = 10 and unit has 50 strength it deals 500 damage per second for Y seconds.

To use this, simply:

  • Custom script: call StrenghDoT(DURATION(INTEGER), DAMAGE(REAL))
  • -------- Example: --------
  • Custom script: call StrenghDoT(10, 3)
  • -------- The above deals target units strength times 3 damage per second for 10 seconds. --------
 
Last edited:
Level 13
Joined
Oct 27, 2008
Messages
1,176
i'm really going to stop asking for help when it comes to triggers, all i ever get is Jass
PS its meant to deal 10,20,30,40,50 dmg per second till the unit dies
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
i have the Jass editor
only thing is whenever i even use jass that has been checked over and should work the game wont even bother loading
and even though the jass don't help i'm going to hand him rep for atlest trying to help
 
Status
Not open for further replies.
Top