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

Standard abilities custom damage

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
See, shockwave, for example, you can change the damage on object editor (Stats - Damage).

But how to do it deal this damage + something else you want, like 300 damage + your gold, when the missile hit the targets ? Should I do it by triggers ? If yes, help me.

NOTES: You, guys, don't need to help me in this thread if the trigger I'm requesting is a brain killer 5hour making trigger.
 
Level 9
Joined
May 21, 2014
Messages
580
You need damage detection system. When the caster casts shockwave, turn on the trigger that detects damage then set a variable (let's say GoldValue) (it might be real if it's gold you wanna set) according to how much gold the caster's player has. In the trigger that detects damage, there you deal the GoldValue damage to each of the units that are hit (you might need a buff placer for the shockwave, the the damage detection trigger will have a condition if the unit that was hit has the buff inflicted by shockwave.). It is up to you how to turn off the damage detection trigger so that it doesn't detect any unit that is damaged in the whole map. If it's a shockwave based ability, you got to time the shockwave duration of when it ends, then start a timer. If the timer expires, turn off the damage detection trigger.
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Do you know any Good damage detection system ? There are alot in hiveworks.
 
Level 9
Joined
May 21, 2014
Messages
580
Personally, I'd choose Weep's GDD, but people prefer Bribe's Damage Detection, since Bribe's Damage detection system is already compatible with Weep's, but not vice versa.

EDIT: Though if anyone out there knows how to do this without using buff placers (so it'd be more dynamic), please post in here and enlighten us!
 
Level 3
Joined
Sep 30, 2012
Messages
31
Uh, you could have a dummy unit follow the shockwave missile and damage enemies in the area.

To be a bit more specific:
Create a dummy.
Move it towards the target location every 0.03 seconds at the same speed as the missile.
Damage all enemies around it, then mark those enemies as "hit" (so they don't get hit more than once).
When it reaches the target, remove the dummy.
 
Level 10
Joined
Jun 6, 2007
Messages
392
With AOE abilities, the only way is to trigger the spell. Even detecting if damage is from attack/spell is difficult, but it's impossible to detect which spell caused damage. For example, you cast flame strike, and immediately after you cast shockwave. There's no way to tell which spell damaged the target.

For single target abilities you can use the event "unit starts the effect of an ability".

If you need triggered versions of some standard abilities, you can pm me. However, I only make triggers with vJass, so you'll need newgen.

If you need shockwave, the spell I posted in this thread is quite similar.
 
Level 9
Joined
May 21, 2014
Messages
580
Uh, you could have a dummy unit follow the shockwave missile and damage enemies in the area.

To be a bit more specific:
Create a dummy.
Move it towards the target location every 0.03 seconds at the same speed as the missile.
Damage all enemies around it, then mark those enemies as "hit" (so they don't get hit more than once).
When it reaches the target, remove the dummy.

I had to ask: How would you know what's the speed of the shockwave? I may be just being dumb...
 
Level 9
Joined
May 21, 2014
Messages
580
you can calculate it :)
1000*0.03 -> this is the offset (1000 is configurable)
make it move towards it every 0.03 seconds
it'll has the same speed as shockwave missile if the speed is 1000 in object editor

i can make the spell if you want, it's pretty easy for me :3

Can you make a sample spell for me? This will prove really, REALLY useful at triggering. Post it here as it may help hdm.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Since you'll have to trigger it either way why not just only make it a trigger from the start, you have an ability that does nothing, Channel perhaps, and spawn a unit that moves towards the direction between the caster and target point of ability being casted, dealing damage in an AoE. If you want it to be a cone like Carrion Swarm you just increase the AoE periodically.

No reason to add a DDS just for this, I'd still reccomend having one though.

Edit: It's faster and less work with a unit indexer (which you'd get with the DDS)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
I had to ask: How would you know what's the speed of the shockwave? I may be just being dumb...

Take your time and please don't forget. :>

Please be careful not to hijack threads. If you have a request, please post it in a new thread.

Also, you don't need to do a custom model for this. When the spell is casted, disable unit indexer and create a dummy model on top of the hero (than disable unit indexer >.>). Set the user data of the dummy to the user data of a hero. Have the dummy model cast carrion swarm (because shockwave leaks) at the point you requested. On damage detection system, you can check if the unit was a shockwave dummy than deal 1000 + 0.3x gold of owning player of udg_UDexUnits[Unit user data of dummy]

above solution is less in depth of mine. btw carrion swarm does no such "cone"
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Please be careful not to hijack threads. If you have a request, please post it in a new thread.

Also, you don't need to do a custom model for this. When the spell is casted, disable unit indexer and create a dummy model on top of the hero (than disable unit indexer >.>). Set the user data of the dummy to the user data of a hero. Have the dummy model cast carrion swarm (because shockwave leaks) at the point you requested. On damage detection system, you can check if the unit was a shockwave dummy than deal 1000 + 0.3x gold of owning player of udg_UDexUnits[Unit user data of dummy]

above solution is less in depth of mine. btw carrion swarm does no such "cone"

Can you trigger this ?
 
Status
Not open for further replies.
Top