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

Buying abilities(Which is different from others) Help.

Status
Not open for further replies.
Level 7
Joined
Mar 22, 2010
Messages
214
Sorry but...

I just wanna ask this thing.
A really different from others....
First you will choose your hero then you will pick 3 abilities that you will be leveling by yourself just like normal abilities which you level them when you gain a level...and not by purchasing them to level up....

Note: If you really don't understand it, I will suggest for you to try playing custom hero ''arena'' it's different from custom hero ''wars''/you can download it at hiveworkshop.

Thanks.
 
Last edited:
Level 4
Joined
Jan 20, 2007
Messages
65
You're going to have to create an item with an identical description to each one of your spells. When a player buys that specific item, remove it and give the unit the respective ability.

If you want to level these abilities up. You're going to have to store each ability learned in variable arrays. (IE: Ability1, Ability2, etc)

Or if you want to level them up by purchasing the same ability, you can just use the trigger you used to give the ability, and check to see if the player already has the ability. If so, just add a level to it.
 
Level 4
Joined
Jan 20, 2007
Messages
65
Aight. I'm not sure how much you've worked with variables. I haven't done this kind of trigger before, so their might possibly be a better way to do it.
It's kind of a pain in the ass, however, this way will work.

I just noticed that there is no variable for spell type. That makes this a little harder. Again, there may be a better way to do this, but this is all I can come up with on the spot.


First you want to assign a number to all your spells. This is something that does not require a trigger, it's just something to refer to your spells, since there is no variable to store the actual spells.

For this example, we'll say that these spells have been assigned.

Storm Bolt - 1
Holy Light - 2
Death Coil - 3

  • Learn Spell
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Storm Bolt (Item)
        • Then - Actions
          • Unit - Add Storm Bolt to (Hero manipulating item)
          • Set Spell1[(Player number of (Owner of (Hero manipulating item)))] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Holy Light (Item)
        • Then - Actions
          • Unit - Add Holy Light to (Hero manipulating item)
          • Set Spell1[(Player number of (Owner of (Hero manipulating item)))] = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Death Coil (Item)
        • Then - Actions
          • Unit - Add Death Coil to (Hero manipulating item)
          • Set Spell1[(Player number of (Owner of (Hero manipulating item)))] = 3
        • Else - Actions
      • Item - Remove (Item being manipulated)
This trigger is to give the spell to the hero when they learn it, and store the spell based on the number we assigned to it so we can refer to it later.


Now, when you want to level the spell. You'll have create a trigger that goes something like this.

  • Level Spell 1
    • Events
      • Unit - A unit Does whatever needed to level spell 1
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spell1[(Player number of (Owner of (Triggering unit)))] Equal to 1
        • Then - Actions
          • Unit - Increase level of Storm Bolt for (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spell1[(Player number of (Owner of (Triggering unit)))] Equal to 2
        • Then - Actions
          • Unit - Increase level of Holy Light for (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spell1[(Player number of (Owner of (Triggering unit)))] Equal to 3
        • Then - Actions
          • Unit - Increase level of Death Coil for (Triggering unit)
        • Else - Actions
This trigger checks the spell, based on the number you assigned to it, and increases the level depending on which spell they had.


That should do it. Lemme know if you have anymore questions.


EDIT: Sorry, forgot to change the items in the trigger. It's fixed now.
 
Level 4
Joined
Jan 20, 2007
Messages
65
What in the world? You're being ridiculous right now. You're asking for a system for buying spells. I gave you a very simple one.

Does it matter if it's not the exact same as another map? As long as the result is the same, I don't see a problem.


And wow, lol. I Just saw the variable for abilities. I was looking for spells. That makes it even easier.
 
Level 4
Joined
Jan 20, 2007
Messages
65
Okay, I played the custom hero map. I'm convinced that the problem here is that you're just not educated enough when it comes to triggering.

The differences between the tutorials you've given and the system in Custom Hero Arena are marginal at best.

For the sake of being helpful, I will explain to you, how to modify the systems you've been presented, to get a duplicate of what you've seen in the map you're trying to emulate.

When the hero purchases the item, you simply store that ability in your variable array. Do not give the hero that ability. Create 4 spells based off item spells, that have no icon when learned as hero icons (such as: Gloves of Haste, Claws of Attack, Armor Bonus, etc...) Obviously you want to give these abilities no effect. Name each ability to reflect which spell it will level up (IE: Level Spell 1, Level Spell 2)

Next, simply use the secondary trigger I gave you, and set the event to a unit learns an ability. When the unit learns the ability "Level spell 1", then give the player the spell stored in the variable array. If the player already has the spell, and is leveling it to level 2, just set the spell level of the variable stored spell, to the spell level of the "Level spell 1".


That will give you an exact duplicate in forms of function, to the system that you're coveting.


If this does not make sense to you, you need to further study triggering if you hope to implement this system into your map.

Hope this helps.
 
Level 4
Joined
Jan 20, 2007
Messages
65
At this juncture, with all the thought invested into helping you. If you are unable to complete the system with our help, I'd be willing to create it for you.

So if you are absolutely unable to finish it on your own, PM me, and we can work out how you'd like the system created.
 
Status
Not open for further replies.
Top