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

[Trigger] GUI trigger help

Status
Not open for further replies.
Level 2
Joined
May 15, 2007
Messages
12
Im looking for a way to make a Unit Generic Event that when a Unit gets hit by a spell, do action.

Unit Generic doesn't have Damage Taken, Unit Spesific does, but you cannot add unit groups. So im very confused and cant figure out how to do it. I know there is probbly some very simple way to do this so any help would be great.
 
Level 8
Joined
Sep 13, 2006
Messages
431
Events
A unit starts the effect of an ability

Conditions
//Whatever you want

Actions
//Whatever again, using 'target unit of ability being cast' to refer to the unit hit by the spell
//Keep in mind that you can only reference this unit for somewhere around 0.1 seconds before the value is discarded, so avoid waits or store the unit with variables.
 
Level 5
Joined
Jun 23, 2004
Messages
126
Already been more threads about generic unit takes damage, take a look at this http://hiveworkshop.com/forums/showthread.php?t=33847
You cannot determine if the damage was done by a spell unless you have a very good and accurate attack detection system(i would suggest Vex')
But Generic unit takes damage is possible, just check above link.

IIRC you use an Orb-based buff and for the damage taken thing, check to see if the damaged unit has the buff. If he has the buff, regular damage. Otherwise, spell damage.
 
Level 2
Joined
May 15, 2007
Messages
12
Thanks for replys, iv thought about checking for a buff effect, but i got lazy and tired last night so i went to sleep. As far as the targeted unit takes damage that attually works, but the problem is the spell i was using is Shockwave and it doesn't detect the other units hit by its AOE.

ATM im working on Combo system with Chargible skills and other junk. Not bad for 3 week in wc3 editor.
 
Level 2
Joined
May 15, 2007
Messages
12
I just got done reading that guys stuff on Generic Unit Dmg. You need CSCache and if you want it to detect damage baced on a spell you are going to need knowledge of JASS. I Posted in GUI becuase even thought i can read and understand a little about what JASS is doing i can not alter to get things i want like i can with GUI codes. If you can help me with altering that guys code so it regesters Damage taken from "Ability to be determined" That would help alot. I also want to use this JASS code to make a better Blood System that Increases Blood splater baced on % of units life. I know how to do it in GUI i just need to get this code working and ill be able to hopefully make a leak free version.
 
Status
Not open for further replies.
Top