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

Ability : Money bag hook?

Status
Not open for further replies.
Level 5
Joined
May 8, 2020
Messages
87
i want to make a skill to pickpocket the enemy with stormbolt skill ( instead of throwing a hammer, it will hit the head with a lightning bolt) hook for about 50 gold,
if the opponent has less than 50 gold then stop or skill will cancel
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,883
  • Gold Steal Begin Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Target unit of ability being cast)) Current gold) Less than 50
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop.
        • Else - Actions
  • Gold Steal Start Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Player - Add 50 to (Owner of (Triggering unit)).Current gold
      • Player - Add -50 to (Owner of (Target unit of ability being cast)).Current gold
 

Attachments

  • Gold Steal.w3m
    17 KB · Views: 3
Level 5
Joined
May 8, 2020
Messages
87
If - Conditions
((Owner of (Target unit of ability being cast)) Current gold) Less than 50
there are 2 lines
: Integer Comparison
: Player Comparsion
Which line should I choose? and i don't see the 2 lines it matches
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,883
50 is an Integer, therefore it's an Integer Comparison. The function is categorized as a Player Property.

If it said "Equal to" or "Not Equal to" a Player then you would know it's a Player Comparison.

It's just like if you see:
  • Set Variable SomeVar = 100
  • Set Variable SomeVar2 = True
You know SomeVar is an Integer variable because 100 is an Integer. You know SomeVar2 is a Boolean variable because booleans are either True/False.

The value tells you the type.
 
Level 5
Joined
May 8, 2020
Messages
87
Gold Steal Begin Cast
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Steal Gold
Actions
Set SomeVar = (Owner of (Target unit of ability being cast))
Set SomeVar2 = True
Set SomeVar3 = 50
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Else - Actions

What should I do next?
 
Level 5
Joined
May 8, 2020
Messages
87
1686033222546.png


i don't understand the line If - Conditions
and also do not understand the line: what is current gold
can you explain, i can't open the map
 
Status
Not open for further replies.
Top