HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Leveling Skip

07-27-2005, 01:09 PM#1
9398hrb
On my RPG you get 1 lumber every time you level up. But it seams that if a hero gains more then one level after killing an opponent, then they only get one piece of lumber, as they only leveled up in one go. How would I fix this so that after 100 levels you have gained 99 pieces of lumber and not less?
07-27-2005, 02:24 PM#2
Wakoo
Maybe you can write in a var, the wood allready given, and when the hero get level you test, and give the difference(and update the var).
07-27-2005, 11:37 PM#3
c0nnick
when the hero levels up, set the lumber to the lvl of the hero - 1, that will solve yur problem
07-28-2005, 12:56 AM#4
Anitarf
Quote:
Originally Posted by c0nnick
when the hero levels up, set the lumber to the lvl of the hero - 1, that will solve yur problem
Unless, of course, you can spend the lumber on things. I suggest you use an integer variable array to store last level gained for each hero, and whenever he gains a level add as much lumber as there is the difference between the new level of the hero and the value of the variable, and then update the variable.