"PickPocket" Spell

prebenapa

New Member
Reaction score
0
I'm wondering how you make a spell that works as pick pocketing for the user. That you simply gain an amount of money if you use it on another players hero.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Try something along these lines.
Trigger:
  • Pickpocket
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pickpocket
    • Actions
      • Player - Add 50 to (Owner of (Triggering unit)) Current gold
 

prebenapa

New Member
Reaction score
0
But this means that every time I use the ability i get money, it doesn't have to be on a specific unit right?
 

Kayoss666

Member
Reaction score
7
it would also be cool to set the variable to like a percent of the targets amount of gold. like level one - 10% level two - 20%
and then make it pick a random number between 0 and your variable that way you don't always get the same thing.
 

Molehole

New Member
Reaction score
2
Would this be any help? Put Pickpocket instead of the Animate Dead ofcourse.

ra0ld3.png


Enemy_gold is an integrer variable.

This trigger takes fifth of enemys gold and gives it to you.

If you want to make the amount random replace the number 5 with another variable and do another action of "set variable = random number between (what you want)" Reals can handle numbers that have decimals, integrers only numbers like 0,1,2,3,4 so choose the variable from which you'd like better.

Btw if it doesn't work try replacing the "Triggering player" with owner of triggering unit. My trigger may be flawed :p I didn't test it out.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top