• 🏆 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!

[Trigger] How shall i get this to work?

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hi, im making an inventory system for my map and i dont know how to make the 3rd person combat (Only the ones in front of the hero will loose hp) and how to make my Items take more damage, i got an ability that increases the damage with 14, but it wouldnt affect the 3rd Person combat.. So how to make it add to the damage ?
This is the Item setup..
  • InvItems
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- 1hSwords --------
        • Do Multiple ActionsFor each (Integer A) from 1 to 1, do (Actions)
          • Loop - Actions
            • -------- Searing Blade --------
            • Set ITEMOneHandedSword[1] = Searing Blade
            • Set DestructibleITEMSword[1] = Searing Blade
            • Set Item1hSwordDescript[1] = Searing Blade|n|n|c0000FFFFClass:|r 1 Handed Sword|n|n|c0080FF00Requirements|r|n|c00FF8000Level:|r 0|n|c00FF8000Skills needed:|r None|n|c00FF8000Stats:|r 14 Damage, 8 Strength|n|n|c0080FF00Description|r|nA magical blade formed by dwarves.
            • Set Item1hSwordAbility[1] = 14 Damage
            • Set Item1hSwordAbilityStats[1] = 8 Strength
            • Set ItemOneHandFxPath[1] = war3mapImported\Searathil.mdx
            • Set Item1hSwordAbilitySecondSlot[1] = 14 Damage
            • Set Item1hSwordAbilityStatsSecondS[1] = 8 Strength
            • Set ItemOneHandSwordReqlvl[1] = 1
            • -------- ' --------
and this is the Use Trigger

  • Do Multiple ActionsFor each (Integer A) from 1 to 1000, do (Actions)
    • Loop - Actions
      • -------- 1h Sword 1st slot --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • WeaponUsed[1] Equal to (==) False
            • (Hero level of Unit[1]) Equal to (==) ItemOneHandSwordReqlvl[(Integer A)]
          • Then - Actions
            • Unit - Remove ItemOneHandSwordUsedabi[1] from Unit[1]
            • Unit - Remove ItemOneHandSwordUsedabi[2] from Unit[1]
            • Unit - Add Item1hSwordAbility[(Integer A)] to Unit[1]
            • Set ItemOneHandSwordUsedabi[1] = Item1hSwordAbility[(Integer A)]
            • Unit - Add Item1hSwordAbilityStats[(Integer A)] to Unit[1]
            • Set ItemOneHandSwordUsedabi[2] = Item1hSwordAbilityStats[(Integer A)]
            • Special Effect - Destroy ItemOneHandFx[1]
            • Special Effect - Destroy ItemOneHandFx[2]
            • Hero - Learn skill for Unit[1]: Item1hSwordAbility[(Integer A)]
            • Hero - Learn skill for Unit[1]: Item1hSwordAbilityStats[(Integer A)]
            • Special Effect - Create a special effect attached to the left,hand of Unit[1] using ItemOneHandFxPath[(Integer A)]
            • Set ItemOneHandFx[1] = (Last created special effect)
            • Special Effect - Create a special effect attached to the left,hand of Unit[2] using ItemOneHandFxPath[(Integer A)]
            • Set ItemOneHandFx[2] = (Last created special effect)
            • Set WeaponUsed[1] = True
          • Else - Actions
      • -------- 1h Sword 2th slot --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Hero level of Unit[1]) Equal to (==) ItemOneHandSwordReqlvl[(Integer A)]
            • WeaponUsed[2] Equal to (==) False
          • Then - Actions
            • Unit - Remove ItemOneHandSwordUsedabi[3] from Unit[1]
            • Unit - Remove ItemOneHandSwordUsedabi[4] from Unit[1]
            • Unit - Add Item1hSwordAbilitySecondSlot[(Integer A)] to Unit[1]
            • Set ItemOneHandSwordUsedabi[3] = Item1hSwordAbilityStats[(Integer A)]
            • Unit - Add Item1hSwordAbilityStatsSecondS[(Integer A)] to Unit[1]
            • Set ItemOneHandSwordUsedabi[4] = Item1hSwordAbilityStats[(Integer A)]
            • Special Effect - Destroy ItemOneHandFx[4]
            • Special Effect - Destroy ItemOneHandFx[3]
            • Special Effect - Create a special effect attached to the right,hand of Unit[1] using ItemOneHandFxPath[(Integer A)]
            • Set ItemOneHandFx[3] = (Last created special effect)
            • Special Effect - Create a special effect attached to the right,hand of Unit[2] using ItemOneHandFxPath[(Integer A)]
            • Set ItemOneHandFx[4] = (Last created special effect)
            • Set WeaponUsed[2] = True
          • Else - Actions
Now, how to make it affect the Damage of a spell?
 
Level 3
Joined
Sep 11, 2004
Messages
63
Replace the spell with:

1.The effect of the old spell
2.Create a damage variable array for your hero's damage HeroDamage[playerid]
3.Adds to/Reduces from HeroDamage[playerid] whenever hero acquires or drops certain weapons
4.Use UnitDamageTarget to do HeroDamage[playeid] HeroAttackType damage
 
Status
Not open for further replies.
Top