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

A Couple of a Trigger Questions

Status
Not open for further replies.
Level 3
Joined
May 9, 2011
Messages
37
I have some questions regarding triggers and some not about triggers:
1. How do you detect the current attack damage of a hero/unit?
2. How do you run a trigger after, lets say after a dialog button has been clicked and its different for every player and runs at the same time?
3. I dont know if this is the right place, but how do you change the tooltip of the move ability?
4. How do you create a fog that has a shape of a triangle?

Thanks!
- Tauren_009
 
Level 3
Joined
May 9, 2011
Messages
37
Thanks for all your help.
I thought I posted this in Triggers o_O

Maker, it says when I open the map function does not exist: InitHashtable BJ.
Also which function detects the minimum, maximum and average damage?
 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,243
Make sure you are using either normal World Editor or Jass NewGen Pack Editor. Also make sure you have updated to the latest patch.

Then you can call the GetUnitDamage function like this for example:
  • Custom script: set udg_r1 = GetUnitDamage(GetHandleId(*unit*),integer)
That would store the damage into a variable called r1. r1 must be created in variable editor.

Replace the "integer" with 0, 1 or 2. 0 = min dmg, 1 = max, 2 = avg.

Replace the *unit* with the unit whose damage you want to get.
 
Level 3
Joined
May 9, 2011
Messages
37
Whats the latest patch and what do I use to set the unit?
Last question, how to I detect the position of the mouse pointer?
 
Maker, it says when I open the map function does not exist: InitHashtable BJ.

It's InitHashtableBJ (no space) and if you are using Jass NewGen Pack well that's your problem see InitHashtable is one of the cool 1.24 natives that wasn't around when out-dated Jass NewGen Pack was last updated.

Tauren_009 said:
I thought I posted this in Triggers o_O

You did, but I moved it to the right forum. "how to"-type questions by nature generally go in World Editor Help Zone, and Triggers & Scripts is for fixing triggers which you've at least got started on (more of a debugging forum).

Tauren_009 said:
Whats the latest patch?

1.26a

Tauren_009 said:
how to I detect the position of the mouse pointer?

You can't, but you can use Trackables to detect when your mouse hovers over a certain x,y spot or clicks on it.
 
Status
Not open for further replies.
Top