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

Mana spell

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
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

  • Mana Ability.w3x
    17.7 KB · Views: 34
Level 14
Joined
Nov 4, 2006
Messages
1,241
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.
Top