• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] Change Owner, when HP is low

Status
Not open for further replies.

Smiglo

S

Smiglo

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.
 
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%
 
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.
Back
Top