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

"GetDamageScource" question.

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
"GetEventDamageScource"

I want to make an ability that can allow the hero to do critical damage, just like the ability of BM (critical strike).
So what is the best way to do that? GetEventDamageScource?
I am new to Jass, please help, lol thanks a lot.
 
Last edited:
Level 11
Joined
Oct 11, 2012
Messages
711
Not sure exactly what you mean.

GetDamageSource() responds to this event:
JASS:
EVENT_UNIT_DAMAGED
It refers to the unit who has dealt the damage. The unit who took the damage can be referred to by GetTriggerUnit().

Sorry for my confusing question. What I want is to make the hero to do critical physical damage and I want to fulfill that purpose by using Jass (not the ability of BM). So what is the best way to achieve that result? Thanks a lot.
 
Level 11
Joined
Oct 11, 2012
Messages
711
are you using DDS? if so, the Source of the damage is stored in variable ''source'' and if you're using event: *** Takes Damage, then refer to the: Damage Source

Sorry, I am new to Jass and do not use DDS (don't know how to use it).
What I want is to make an ability that can allow the unit to do critical physical damage (not use the ability of BM). So what is the best way to achieve that result? Thanks a lot.
 
The best way is to register the damage and then alter it. However, the altering process is pretty complex for some things (mostly when reducing damage). Since you are new to JASS, I wouldn't recommend using Nes' DDS.

I would recommend something like Bribe's damage engine:
http://www.hiveworkshop.com/forums/...e-v2-2-1-0-a-201016/?prev=d=list&r=20&u=Bribe
Or looking_for_help's damage engine:
http://www.hiveworkshop.com/forums/...a-231846/?prev=d=list&r=20&u=Looking_for_help

They both allow for damage modification. You would multiply the damage result (depending on the critical strike ability. e.g. to deal two times normal damage, you'd multiply the damage by 2). However, I can't go into much detail since I haven't used those systems much. The best thing to do would be to look at the test maps for either one. Then you can make your spell based off of it.

Damage detection is sort of a weird thing, and damage modification can get even weirder. Normally I'd promote trying it out yourself--and you can feel free to--but I think that you may want to at least try to use a DDS (like the ones linked above) since they perform their tasks very well. Good luck!

If you need help with creating the floating text, let me know.
 
Level 11
Joined
Oct 11, 2012
Messages
711
The best way is to register the damage and then alter it. However, the altering process is pretty complex for some things (mostly when reducing damage). Since you are new to JASS, I wouldn't recommend using Nes' DDS.

I would recommend something like Bribe's damage engine:
http://www.hiveworkshop.com/forums/...e-v2-2-1-0-a-201016/?prev=d=list&r=20&u=Bribe
Or looking_for_help's damage engine:
http://www.hiveworkshop.com/forums/...a-231846/?prev=d=list&r=20&u=Looking_for_help

They both allow for damage modification. You would multiply the damage result (depending on the critical strike ability. e.g. to deal two times normal damage, you'd multiply the damage by 2). However, I can't go into much detail since I haven't used those systems much. The best thing to do would be to look at the test maps for either one. Then you can make your spell based off of it.

Damage detection is sort of a weird thing, and damage modification can get even weirder. Normally I'd promote trying it out yourself--and you can feel free to--but I think that you may want to at least try to use a DDS (like the ones linked above) since they perform their tasks very well. Good luck!

If you need help with creating the floating text, let me know.

Thank you for your help. I will try to use Bribe's DDS. Nes' DDS looks good, but I don't know how to import it in my map and how to use it. Thank you again.
 
Status
Not open for further replies.
Top