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

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
 
Level 4
Joined
Mar 6, 2007
Messages
73
As I know you'll have to use trigger for this because I dont think there's any spell that can do this.
 
Level 13
Joined
Mar 16, 2008
Messages
941
Doesn't work ;)
What is if a missle flies longer then 0.2 sec?

Just damage the attacker with

  • Spike Carapce Chance
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Level of Spiked Carapace (Chance) for (Attacked unit)) greater then 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Random integer number between 1 and 100) smaller then (25 + ((Level of Spiked Carapace (Chance) for (Attacked unit)) x 25))
        • 'THEN'-Conditions
          • Einheit - Cause (Attacked unit) to damage (Attacking unit), dealing (10.00 x (Real((Level of Spiked Carapace (Chance) for (Triggering unit))))) damage of attack type Spells and damage type Normal
        • 'ELSE'-Actions
Shouldn't open the german WE befor JNGP, it is german till a restart that suxx -.-
 
Level 5
Joined
Jan 27, 2007
Messages
154
Doesn't work ;)
What is if a missle flies longer then 0.2 sec?

Just damage the attacker with

  • Spike Carapce Chance
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Level of Spiked Carapace (Chance) for (Attacked unit)) greater then 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Random integer number between 1 and 100) smaller then (25 + ((Level of Spiked Carapace (Chance) for (Attacked unit)) x 25))
        • [B]'THEN'-Conditions
          • Einheit - Cause (Attacked unit) to damage (Attacking unit), dealing (10.00 x (Real((Level of Spiked Carapace (Chance) for (Triggering unit))))) damage of attack type Spells and damage type Normal[/B] 'ELSE'-Actions
Shouldn't open the german WE befor JNGP, it is german till a restart that suxx -.-

Well, You can't expect the damage to be exactly like that, spiked carapce returns a percentage of an attack.

And spiked carapace don't return ranged damage if im not mistaken, so taht would'nt be a prob.
 
Level 8
Joined
Mar 23, 2007
Messages
302
u can go like this: (need jass think)

whener a unit attacks the spiked one, it gets HP back equaly to the lost hp due
to the spikes, but if chance triggers , lets say 20% then the unit will not
gain the hp back.

OR change the spell if nothing works to somthing like this:

there is a chance of 17% that the unit gets spikes for 3 seconds on every hit.
(i know this is not what u want, but it is an alternative solution)
this would damage all future incoming damage dealers.

OR

a chance that when unit is hittet it gets for a splitt second the spikes
a clone of the attacker wwill be create (ofc invisibly) and the hint the unit
depending on his life he lost, the main attacker losses hp
the spikes removed, the clone destryed and u can go again.
 
Status
Not open for further replies.
Top