Experience Bar help please. . .

siephersiepher Member Posts: 1
edited November -1 in Working with GS (Mac)
Hello, im having some trouble working on a simple rpg, i have an experience bar and level up display working but the problem is that when the bar fills up i cant figure out how to get it to reset itself back to zero so i can fill it up again, i tried doing something like

When exp = 21 Change attribute lvl to +1 and change attribute exp to exp-20
and that didnt work, i also tried

when exp = 21 change attribute exp to 1 and that didnt work

also i even tried to have a second exp bar of a different color with a different exp integer attribute and have the first one spawn the second and then destroy itself and that didnt work

so im stumped help me please!

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Well to go back to 0 you would simply do a change attribute to 0.

    What is happening to make it go to 0. is it something that you want to auto return to 0 when its full or does it have to be used.

    You can also use this to increase it from 0 to 20 and auto reset when it goes over 20

    Change attribute game.exp to (game.exp+1)%21
Sign In or Register to comment.