shockwave damage based on caster's attribute

Level 2
Joined
Nov 11, 2019
Messages
19
Hi everyone.
how do i make a shockwave damaged based on caster attribute but it only hurt enemy.
i try to make it but alway hurt everyone in the line
pls help me :(((
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677

Not sure why your Shockwave is damaging allies, that would have to do with the Targets Allowed field which is completely unrelated to your question.
 
Level 2
Joined
Nov 11, 2019
Messages
19
I think that trigger is error
btw i try following this link: [Spell] - Making custom shockwave and custom stampede with hero attribute as damage
but it doesn't deal damage, can you explain it?
here is my trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Ucs1') of Level: ((Level of (Ability being cast) for (Triggering unit)) - 1) to (45.00 + (Real((Abs((Strength of (Triggering unit) (Include bonuses)))))))
thx for reply :))
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677
You don't channel Shockwave. Channeling is reserved for skills like Blizzard, Rain of Fire, Death and Decay, etc. I think that event also fires if the ability has some Casting Time.

You need to use the correct Event:
  • Unit - A unit Begins casting an ability

You can probably use this Event too. This is the best one since it activates when the ability successfully casts:
  • Unit - A unit Starts the effect of an ability

I assume you're using Carrion Swarm and not Shockwave. Shockwave uses a different Damage field than ('Ucs1').
 
Last edited:
but it doesn't deal damage, can you explain it?
Who knows could be many things:
Is your Unit using the right skill? Add an Action that displays on the screen that this trigger runs.
The max dmg amount for field can prevent dealing dmg, if it is 0 or already reached with the current usage.
You wrote on the right field? Maybe your ability is based on shockwave, shockwave has other fields.
 
Level 2
Joined
Nov 11, 2019
Messages
19
My ability based on carrion swarm, i just change it recently but it still not deal dmg.
I set dmg and max dmg to 1 in object editor, do i need to set it to 0?
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677
My ability based on carrion swarm, i just change it recently but it still not deal dmg.
I set dmg and max dmg to 1 in object editor, do i need to set it to 0?
Did you do my fix? Your trigger is wrong.

Edit: And a max damage of 1 means that the spell can only deal 1 total damage. Max Damage is there so that you can limit the TOTAL possible damage dealt, this is intended to balance Area of Effect abilities so that they don't deal too much damage when there's a lot of targets. Shockwave/Carrion Swarm would be too powerful in ladder games if they had no limit to their damage.

Also, why do you use Abs in your Arithmetic? Real(Abs(Strength of unit)). That doesn't do anything since Strength can't be set to a negative value.
 
Last edited:
Level 2
Joined
Nov 11, 2019
Messages
19
ok i fix it
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Ucs1') of Level: ((Level of (Ability being cast) for (Triggering unit)) - 1) to (45.00 + (Real((Strength of (Triggering unit) (Include bonuses)))))
but it still not deal dmg
 

Attachments

  • 1631062995840.png
    1631062995840.png
    629.7 KB · Views: 16

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677
Possible fixes:
  • Use the other Event BEGINS casting an ability.
  • Double check that your Condition is correct -> (Ability being cast) Equal to Carrion Swarm. Remember that you have more than 1 ability named Carrion Swarm, this is where Suffixes come in handy.
  • Reset the BUFF on the Carrion Swarm ability. Don't leave it blank.
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677
You're making a mistake somewhere along the lines. Are you sure you tried everything I said?

You can attach the map and I'll debug it for you if you'd like.
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677
Ah, I made a mistake before, Max Damage of 0 is not infinite... it's 0.

Set the Max Damage to something like 99999 (if you hold shift when opening a field you can go over this limit).

Also, use this Event:
  • Unit - A unit Starts the effect of an ability
 
Last edited:
Level 2
Joined
Nov 11, 2019
Messages
19
  • Actions
    • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Ucs1') of Level: ((Level of (Ability being cast) for (Triggering unit)) - 1) to (45.00 + (Real((Strength of (Triggering unit) (Include bonuses)))))
I wonder why level of ability being cast must - 1
 
Last edited:

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,677
It's indexed starting at 0 like most things in programming. It's annoying since basically everything else in the editor that references a Level of an ability starts at 1.

0 = Level 1
1 = Level 2
2 = Level 3
etc.
 
Last edited:
Top