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

Hero ability which gives rescources?

Status
Not open for further replies.
Level 2
Joined
Apr 18, 2011
Messages
11
Hey all, I just started to do some mapping in my free time and i decided to create an AoS style map. So far its been going well but i need help with making a hero ability which gives the player rescources upon use. I tried doing this by customising the item ability "Gold coins" but when the hero learns the ability during the test game, there is no button to use it. A little bit of advice would be nice. Thanks in advance!
 
Level 2
Joined
Apr 18, 2011
Messages
11
Sorry i'm not very good at creating custom abilities. I'm not sure what you are refering to... how can i make the channel ability add gold and lumber to the player?
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
The easiest way to go about doing something like this would be to create a dummy ability in the Object Manager. That is, to set everything about the ability that does something to 0 or null, none, etc.

That dummy ability, when activated, will not do anything but whatever kind of animation it has been set up to do. Now, you would then make a trigger something along the lines of

  • Resource Ability
    • Events
      • Unit - Unit begins the effect of an ability
    • Conditions
      • Ability being cast (=) Resource Ability Name
    • Actions
      • Player - Add 10 to (Owner of (Triggering Unit)) gold
That's not entirely accurate, but I hope you get the gist of it. I don't have WE on this computer, so I cannot open it up to give you the actual trigger functions. With this setup, whenever the unit cast's that ability, the player will get +10 gold. Now, don't forget to set your cooldown time for the ability in the OE. You don't want people getting 1000 gold a minute doing this, :)
 
Level 2
Joined
Apr 18, 2011
Messages
11
Gave it a go but just realised this isn't going to work since the ability has 10 levels and the trigger only accounts for the use of the overall ability and not the level of the ability. Ideally i would like to make it so that the ability will give different amounts of rescources on different levels.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Def shows you how to do it for variable levels.

I haven't touched WE in a couple months, and you didn't mention multiple levels, :p
 
Status
Not open for further replies.
Top