• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Ability Shop?!

Status
Not open for further replies.
Level 4
Joined
Jun 4, 2009
Messages
70
Hey!
I wonder how i can make a working ability shop. I manage to make 1 when you get the spell and if buy again you increase level on it, but when i try i cant buy 1 more ability, only 1. And if you are on highest level of the ability and buy again, you just loose gold/lumber and no upgrade, can anyone possible help me to fix this and make a working ability shop? :csad:
 
Level 35
Joined
Feb 5, 2009
Messages
4,560
Perhaps a triggered counter would assist you? Like every time the player purchases an ability to increase its level, it contributes to its own unique counter. Once that counter reaches the number of levels you want the ability to have, you could simply make the dummy item unavailable.

That sounds funky about not being able to get other abilities, though. Then again, it's impossible to help you any more without actually seeing the code itself.
 
Level 8
Joined
Dec 9, 2009
Messages
397
Use unit get an item
item = to buff item
remove buff item
if level of ability = 0
give ability to buying unit
else if ability < max level
increase level of ability
else give money back

Your abilities have to be unit abilities, not hero abilities.

hope that helps
 
Hey!
I wonder how i can make a working ability shop. I manage to make 1 when you get the spell and if buy again you increase level on it, but when i try i cant buy 1 more ability, only 1. And if you are on highest level of the ability and buy again, you just loose gold/lumber and no upgrade, can anyone possible help me to fix this and make a working ability shop? :csad:

post the trigger? anyway Ultimatony's suggestion would work.
 
Status
Not open for further replies.
Top