Ability : Money bag hook?

Status
Not open for further replies.
Level 5
Joined
May 8, 2020
Messages
90
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
 
  • 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

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
 
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.
 
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?
 
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.
Back
Top