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

Adding a chance componant to Spiked Carapace

Status
Not open for further replies.
Level 1
Joined
Mar 15, 2008
Messages
3
Hey all, I'm new both to this site and to modding Warcraft 3. I've been reading tutorials and playing around with the world editor, but I haven't found a way to modify some of the abilities in the ways I want to. My problem is simple, I want a passive ability that, like spiked carapace, damages attackers, but i don't want it to trigger all the time, just a certain percentage of the time.

can anyone help me with this?

-snak

edit: whoops wrong forum. There doesn't seem to be a way for me to delete this post, if a mod could either delete it or move it to the correct forum that would be great.
 
Last edited:
Level 11
Joined
Dec 11, 2007
Messages
888
so you want to make a spiked carapace that has a chance to damage attackers?
it must be done with triggers and you will need to use a dummy aura for this. make a new spell based on an aura and set all bonuses to 0, make 4 different buffs for each level of ability (supposing your ability has 4 levels) and change targets allowed to Self. then make this trigger:
  • Chance
    • Events
      • Unit - Your Unit Takes damage (you need a unit that is placed on the map)
    • Conditions
      • ((Damage source) is A melee attacker) Equal to True
    • Actions
      • Set Var1 = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Your Unit has buff Your Buff Lv1) Equal to True
              • Var1 Less than or equal to 30
        • Then - Actions
          • Wait 0.15 seconds
          • Unit - Cause Your Unit to damage (Damage source), dealing ((Damage taken) / 6.70) damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Your Unit has buff Your Buff Lv2) Equal to True
              • Var1 Less than or equal to 40
        • Then - Actions
          • Wait 0.15 seconds
          • Unit - Cause Your Unit to damage (Damage source), dealing ((Damage taken) / 5.00) damage of attack type Spells and damage type Normal
        • Else - Actions
  • continue for each level like this
first you need an integer. when the ability is level 1 it has a 30% chance to deal back to the melee attacker 15% of damage dealt to you
when the ability is level 2 it has a 40% chance to deal back to the melee attacker 20% of damage dealt to you
then continue with If\Then\Else for each level
 
Last edited:
Status
Not open for further replies.
Top