• 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] Change Owner, when HP is low

Status
Not open for further replies.
Level 1
Joined
Apr 17, 2006
Messages
1
I need this code:
Unit attacks one type of BUILDING, and when this building have less than X% HP, it change owner to attacker. I need code that will change owner of not specified bulding just of one type, like Tower.
Thx for help.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
this should probably be in maps, but w/e

Events
Unit - A Unit Is Attacked
Conditions
Unit Type of Triggering Unit Equal to *Tower, or w/e*
Percent Life of Triggering Unit less than *percent*
Actions
Unit - Change owner of Triggering Unit to Owner of Attacking Unit, and Change Color
Unit - Set Percent Life of Triggering Unit to 100%
 
Level 5
Joined
May 9, 2006
Messages
162
Prepare fire extunguishers, I'm going to flame!
Another n000000000b comes to forums (JASS forums, even not Maps) without even trying to write triggers and learn. I'm wondering: are all of our visitors such stupid?
 
Status
Not open for further replies.
Top