upgrade btn...

DsAngelDsAngel Member Posts: 29
edited November -1 in Working with GS (Mac)
Hi! need guide to create a upgrade kind of btn... so far this is the situation:

i create a btn to use for upgrade but it out weird coz if i hv lot of money to upgrade more than a lvl, it automatic upgrade like 3 lvl on a single click... i want it to upgrade once per click not multiple time per click...
exp:
this is what i want it to happen
time slow length 1 sec <buy>(1 click) ---> time slow length 2sec

but now if u have enough to upgrade more than once...
time slow length 1 sec <buy>(1click)---> time slow length 3 sec

Help?

Comments

  • AppsRacKAppsRacK Member Posts: 346
    You should separate the rule for upgrading to be more flexible.

    Rule
    if button is Pressed && game.money >= game.SkillCost
    --> game.skillLevel = game.skillLevel+1;
    --> game.SkillCost = game.SkillCost+ (needed additional money for the next upgrade)

    Rule
    if game.skilleLevel = 1
    --->add upgrade here
    if game.skillLevel = 2
    -->add upgrade here
    etc....
  • mangaroomangaroo Member Posts: 419
    your quite selective in which words you chose to actually type out fully and its pretty confusing when you do it in the topic..just sayin'
  • DsAngelDsAngel Member Posts: 29
    Drahc --> i see. will give it a try!

    mangaroo --> Really? Sry! will try to do better next time! (p.s. bad at english :( )
  • DsAngelDsAngel Member Posts: 29
    Thanks a lot! it work! :)
  • AppsRacKAppsRacK Member Posts: 346
    cool :)
Sign In or Register to comment.