• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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