• 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] A few triggers for my project

Status
Not open for further replies.
Edit: I just realized I posted this in the wrong section. Could someone please move this for me to the Spells and Systems section.

For my project, Starshatter ORPG, I need a bit of help by configuring a couple triggers. Here goes.

Right now, I am working on a passive spell called 'Meteor'. What it is, is a sort of life-saver spell that will activate once the caster's health drops below 10%, creating a Starfall effect in a small radius.

Here's the problem: I cant find the right fied for percentages in the condition, nor how to run the ability in the events. So far, I have this:

  • Events
  • Unit - A unit is attacked
  • Conditions
  • ((Unit-type of Triggering unit)) Equal to Hero and ((Life of (Triggering unit)) less than ????)
  • Events
  • Comment - How do I follow this?

My second one, this is a question. I know that through chat strings, their is a way to change the player name, but can you also change the hero proper name as well?
 
Question 1: You need to make a generic event like:
Code:
EVENTS: 
"Time- every .027 seconds of game time"
--------------------------
ACTIONS:
If "(Your unit)'s life equal or less than 10%"

Then "Add (Your ability) to (Your Unit)"

Else "Do nothing"

Question 2: Thats not posable (at least with GUI :/)
----------------
Sorry that its not in trigger code i cant log on to my comp with Wc3 instaled its being an ass. :confused:
 
That will not work, sorry vamp.

Let me explain myself a little bit better: I need to find the GUI trigger function to get the percentage. Right now it will only give me useless items for this tasks: tangents, coordianates, integers, etc.

Also, the ability is already learned. I just need the ability to be activated.

Come to think of it, I think this might have to be handled in Jass. Dammit!:razz:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
To trigger it use the unit is damaged event.
Then check if it has the buff of your spell on the damaged unit, if not it will not continue.
Then check your life.

Life returning actions are located in "real" opperations. You can not only get a units current life, but its max life. From those 2 you can easily make a percentage real via the use of simple maths that you are taught when you are 12 years old. Incase you do not know, that is unit's current life divided by units max life. The outcome will be a real like "0.95" which will mean the unit currently has 95% life. You can then logic test that value for the percentage you are after.
 
Status
Not open for further replies.
Top