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

I need you to guide me how to use this snippet

Status
Not open for further replies.
Level 1
Joined
Jun 13, 2008
Messages
132
Hi again, Well, I understand most of it, and I am able to use it properly, but I need you to tell me how to run an efficient trigger and detect the ammount of damage I have, I am doing it my way right now, but it is messy, I want to do it more professionally. Here is the snippet: http://www.thehelper.net/threads/set-damage.113235/

Right now my skill needs to add damage to you only if your current damage is not above 50.
 
Hi again, Well, I understand most of it, and I am able to use it properly, but I need you to tell me how to run an efficient trigger and detect the ammount of damage I have, I am doing it my way right now, but it is messy, I want to do it more professionally. Here is the snippet: http://www.thehelper.net/threads/set-damage.113235/

Right now my skill needs to add damage to you only if your current damage is not above 50.

Unfortunately, there isn't a direct way to detect the amount of damage a unit can do. You should keep track of it by keeping track of the unit's attributes (if it is a hero) and its items. Usually you'll store their base damage in a hashtable, and then whenever the unit levels or gets an item that changes damage, you would update the value in the hashtable. But it depends on your map. Some maps have a bunch of items with +damage, others have no items at all. Some maps have abilities that add damage, etc. So ultimately, you would need to find a way that works for your map specifically.

What variant of JASS is that written in?

GUI :p
 
Status
Not open for further replies.
Top