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

[JASS] Help on simple topic

Status
Not open for further replies.
Level 5
Joined
Jun 22, 2004
Messages
109
hello guys i am currently working on an ability....n e ways this ability involves a unit being made, except every time this unit attacks he loses 100 life...my question is wat is the trigger to make that happen???(to make the unit lose 100 life every time he attacks)


also one more question aside from that, how would i be able to use triggers to make it so that an ability is cast, and the result of that ability, is not taking mana away but life. (like tides of blood[The Bloood Mage])

plz answer...Ty
 
Level 3
Joined
Aug 21, 2004
Messages
57
JASS?? you don't need JASS for that stuff... just triggers will do.

1)

Event - A unit Attacks

Conditions - (Unit Type of [Event Response -

Attacking Unit] Equal to [Whateveryourunitis]) Equal to True
Actions - Set Life of [Event Response - Attacking Unit] = (Life of [Event Response - Attacking Unit] - 100)]

2)First, set the mana cost of your skill to zero (0), then have the following trigger detect when the spell is cast and deduct HP from the caster.

Event - A unit Starts the Effect of an Ability

Conditions - Ability Being Cast Equal to [Whateverabilityyouwant]

Actions - Set Life of [Event Response - Casting Unit] = (Life of [Event Response - Casting Unit] - (Amountyouwant))
 
Status
Not open for further replies.
Top