Causing unit to damage another won't work

Flow

New Member
Reaction score
4
I'm making an ability which targets a unit. The caster disappears and then reappears next to the target, "blink style", and is meant to do 75 / 100 / 125 damage depending on the level of the ability. Here's the code:


Code:
hayyy
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ice Warp 
    Actions
        Set IB_Multiplier = (Level of Ice Warp  for (Triggering unit))
        Set IW_point = (Position of (Triggering unit))
        Special Effect - Create a special effect at IW_point using war3mapImported\frost warp.mdx
        Custom script:   call RemoveLocation(udg_IW_point)
        Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast))
        Set IW_point = (Position of (Triggering unit))
        Special Effect - Create a special effect at IW_point using war3mapImported\frost warp.mdx
        Custom script:   call RemoveLocation(udg_IW_point)
        Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (50.00 + (25.00 x IW_multiplier)) damage of attack type Hero and damage type Normal

Everything works great and looks really nice, but the targeted unit doesn't take any damage from the actual ability... any ideas? .
 

RedSword

New Member
Reaction score
4
Hello Flow,

I tested as you your skill and couldn't get that :

JASS:
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (50.00 + (25.00 x IW_multiplier)) damage of attack type Hero and damage type Normal


tag to work. But I've found a similar way to achieve this :

JASS:
The Trigger
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ice Warp 
    Actions
        Set Spell_LVL = (Level of Ice Warp  for (Triggering unit))
        Set Temp_Point = (Position of (Triggering unit))
        Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Unit - Turn collision for (Triggering unit) Off
        Set Temp_Point = (Position of (Target unit of ability being cast))
        Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 32.00 at Temp_Point, dealing (50.00 + (25.00 x (Real(Spell_LVL)))) damage of attack type Spells and damage type Normal
        Unit - Move (Triggering unit) instantly to Temp_Point
        Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Wait for (Last played sound) to be 0.00 seconds from finished playing
        Unit - Turn collision for (Triggering unit) On


I added trigger to remove leak created by the special effect.

Btw care because :

JASS:
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 32.00 at Temp_Point, dealing 500.00 damage of attack type Spells and damage type Normal


Does damage hero as well, so, depanding of your hero gauge, you might want to change the radius. That's why damaging does come before the teleport.

As well, you might want or not want to turn collision on/off, both gives interesting results. If you choose to turn them on/off, and that your hero double cast (so you doesn't have an enough big cooldown), the hero will be damaged.
 

Flow

New Member
Reaction score
4
I got the damage to work by using a variable for the targeted unit, thanks for the help :)

I have another question now:

I've made a unit-targeting ability. Is there no way for me to order a dummy to cast it? I only get a drop-down list with the abilities of the melee heroes and a few other things when I choose "issue order targeting a unit".
Also, is there no "add buff" action in the triggers? :(

Thanks,
Flow
 

LightChaosma

New Member
Reaction score
60
if you base a custom ability off say chain lightning, and you want a dummy to cast it by trigger, you have to order him to orc far seer - chain lightning.

to add buffs, just make a custom skill, with 0 damge or whatsoever, and make a dummy cast it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top