• 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] Why wont the hero use his ability when i tell him to...

Status
Not open for further replies.
Level 8
Joined
Aug 21, 2009
Messages
408
The hero does have the rain of fire ability in his abilities section and it is not the unit version(of which the doom guard uses). The ability takes 0 mana and the cast range is 99999. The trigger works for howl of terror, which is an "order with no target" however not with "order targeting point".

UnitBoss = the boss that is summoned. (this isnt the bug either, because it orders the variable unitBoss to use the ability "howl of terror" perfectly fine.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • bossAbilities[2] Equal to False
          • (Percentage life of UnitBoss) Less than or equal to 85.00
          • (Percentage life of UnitBoss) Greater than or equal to 80.00
    • Then - Actions
      • Game - Display to (All players) the text: rain of fire
      • Unit - Order UnitBoss to Neutral Pit Lord - Rain Of Fire (Position of UnitBoss)
      • Set bossAbilities[2] = True
    • Else - Actions
Any ideas are greatly appreciated!

Dont mind the messy trigger and possible leaks. Im simply trying to get this thing to work first ^^
 
Level 9
Joined
Apr 23, 2011
Messages
460
Make a variable if you don't already have one called tempLoc. Before you have it say "Rain of Fire", use Set Variable to
  • Set tempLoc = (Position of UnitBoss)
and after you set bossabilities[2] = true put: Custom Script: call RemoveLocation(udg_tempLoc). This removes a location leak and might fix your problem.
 
Level 8
Joined
Aug 21, 2009
Messages
408
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • bossAbilities[2] Equal to False
          • (Percentage life of UnitBoss) Less than or equal to 85.00
          • (Percentage life of UnitBoss) Greater than or equal to 80.00
    • Then - Actions
      • Set TempLocation = (Position of UnitBoss)
      • Game - Display to (All players) the text: rain of fire
      • Unit - Order UnitBoss to Neutral Pit Lord - Rain Of Fire TempLocation
      • Set bossAbilities[2] = True
      • Custom script: call RemoveLocation(udg_TempLocation)
    • Else - Actions
Removing the leaks didn't help. Any other ideas? +rep
 
Level 8
Joined
Aug 21, 2009
Messages
408
This trigger is activated by UnitBoss getting attacked. it checks if his health is between those percentages; if it is, then the hero will cast that ability. And i dont think that is the cause, for example:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • bossAbilities[1] Equal to False
          • (Percentage life of UnitBoss) Less than or equal to 100.00
          • (Percentage life of UnitBoss) Greater than or equal to 95.00
    • Then - Actions
      • Unit - Order UnitBoss to Neutral Pit Lord - Howl Of Terror
      • Set bossAbilities[1] = True
    • Else - Actions
This one works fine :/
 
Level 8
Joined
Aug 21, 2009
Messages
408
Eh... ive just ended up using this trigger instead (found it in one of my older maps :D)

  • Ability rain of chaos
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to UnitBoss
      • (Life of (Triggering unit)) Less than or equal to 18000.00
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Add Rain of Fire BOSS to (Triggering unit)
      • Hero - Learn skill for (Triggering unit): Rain of Fire BOSS
      • Wait 1.00 seconds
      • Unit - Order (Triggering unit) to Neutral Pit Lord - Rain Of Fire (Position of (Triggering unit))
It'll have to do.. and yes, there are leaks, il fix that later..
 
Status
Not open for further replies.
Top