• 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] Ability change

Status
Not open for further replies.
Level 3
Joined
Apr 2, 2006
Messages
28
I get fatal error when the hero gets less than 50% hp:
BattleOrders - int variable
Offense, defense - abilities

Unit- HERO takes damage

(percentage life of HERO) less than 50.00

Set BattleOrders = level of Offense for triggering unit
Unit - remove Offense from triggering unit
Unit - add defense to triggering unit
Unit -set level of Defense for triggering unit to BattleOrders
_____________________________________________________________

Also this ability teleports hero units when it shouldnt:

Pick every unit in (region) matching ((picked unit is a hero ) equal to false) and do (actions)
Move (picked unit) instantly to (random point in region2)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Add/remove ability do not work that way for hero skills.
Removing will make the skill level 0 but it will still be in the learn section.
Adding will add it as level 1.
Instead of using remove than add, just add a Engineering upgrade based ability(remove the attachment/buff in the object editor) which should replace offense with defense. In the other data fields about abilities leave those that are.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
((picked unit is a hero ) equal to false)
Should be ((matching unit is a hero ) equal to false)
 
Status
Not open for further replies.
Top