• 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] Money Transfer, Ability + Variables.

Status
Not open for further replies.
Level 1
Joined
May 15, 2007
Messages
88
I want this ability/trigger to COST 200 gold to cast, but it will give you ALL the gold of the target unit.

Say you got 300 gold and target a person with 500 gold, you will loose 200

300
-200
=100

But get 500
100
+500
=600.
You will have 600 gold.

Though it doesn't work ;|


*GoldSteal is a variable.
*Gold Steal is an ability.


  • GoldSteal
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Gold Steal (Neutral Hostile)
    • Actions
      • Set GoldSteal = ((Owner of (Target unit of ability being cast)) Current gold)
      • Player - Set (Owner of (Target unit of ability being cast)) Current gold to 0
      • Player - Add (-200 + GoldSteal) to (Owner of (Casting unit)) Current gold
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Set Integer_Variable = ((Owner of (Target unit of ability being cast)) Current gold)
      • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + (Integer_Variable - 200))
      • Player - Set (Owner of (Target unit of ability being cast)) Current gold to 0

[Edit] Oh didn't notice you made the same thing. lol.
 
Status
Not open for further replies.
Top