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

Need help with Power Word: Fortitude

Status
Not open for further replies.
Level 12
Joined
Nov 5, 2007
Messages
730
Im trying to make a triggered spell based on the World of Warcraft Priest's power word: fortitude.When cast,its supposed to increase the base life of a target friendly unit temporarily(for,lets say,60 seconds in my map) but i cant make it,can anyone help me with this?

Thanks.
 
Level 4
Joined
Feb 22, 2005
Messages
110
Unit - Add ability (Edited ability from an item that increases hp) to target unit of ability being cast.
Wait 60 seconds.
Unit - Remove ability (Edited ability from an item that increases hp) from target unit of ability being cast.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
umm that target unit of ability being cast. doesnt work with waits I guess

WAY 1
Create a variable named TempUnit type of Unit

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your Ability>
    • Actions
      • Custom script: local unit udg_TempUnit = GetSpellTargetUnit()
      • Unit - Add <Health Increasing Ability> to TempUnit
      • Wait X seconds
      • Unit - Remove <Health Increasing Ability> from TempUnit

<Your Ability>
is ability you cast
<Health Increasing Ability> is an ability based of the hp increasing abilities that "Pendant of Vitality" uses

Since its a local it wont effect the casted unit even if you change variable in expiration time

WAY 2
Create variable named TempGroup type of Unit Group
  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff <The ability buff> Equal to True
            • Then - Actions
              • Unit - Add <Health Increasing Ability> to (Picked unit)
            • Else - Actions
              • Unit - Remove <Health Increasing Ability> from (Triggering unit)
      • Custom script: call DestroyGroup(udg_TempGroup)
With this way the increasement of health depends on buffs existance
if buff is removed units hp gets back to normal
<The ability buff> is the buff target unit gets on cast
 
Status
Not open for further replies.
Top