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

Mana spell

Status
Not open for further replies.
You'll need a Unit variable called TempUnit
  • Mana Cast Instant
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Ability (Instant)
    • Actions
      • Custom script: local unit udg_TempUnit = GetTriggerUnit()
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Wait 1.00 seconds
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Custom script: set udg_TempUnit = null
  • Mana Cast Target Unit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Ability (Target Unit)
    • Actions
      • Custom script: local unit udg_TempUnit = GetSpellTargetUnit()
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Wait 1.00 seconds
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Custom script: set udg_TempUnit = null
 

Attachments

the most basic version would be:
  • Mana Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your ability)
    • Actions
      • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 100.00)
      • Wait 1.00 game-time seconds
      • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 100.00)
Edit: too slow :D
 
You'll need a Unit variable called TempUnit
  • Mana Cast Instant
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Ability (Instant)
    • Actions
      • Custom script: local unit udg_TempUnit = GetTriggerUnit()
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Wait 1.00 seconds
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Custom script: set udg_TempUnit = null
  • Mana Cast Target Unit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mana Ability (Target Unit)
    • Actions
      • Custom script: local unit udg_TempUnit = GetSpellTargetUnit()
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Wait 1.00 seconds
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + 100.00)
      • Custom script: set udg_TempUnit = null
You don't need to put triggering unit into a local/variable for the mana cast instant, it'll work anyways because its the unit who triggered the trigger.
 
Status
Not open for further replies.
Back
Top