Guest User

Game Maker RPG exp Codes

a guest
Feb 27th, 2012
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Create:
  2.  
  3. //set xp, max xp and level
  4. global.xp=0
  5. global.max_xp=50
  6. global.lvl=1
  7.  
  8. End Step:
  9.  
  10. //if xp is 50 then level up and raise the max xp so the next level you need 100xp ;)
  11.  
  12. if global.xp>=global.max_xp
  13. {//level up :D
  14. global.lvl+=1
  15. global.max_xp+=50
  16. global.xp=0
  17. }
  18.  
  19. Draw:
  20.  
  21. //draw texts
  22. draw_text(5,5,'xp = '+string(global.xp)+' / '+string(global.max_xp))
  23. draw_text(5,25,'lvl '+string(global.lvl))
Advertisement
Add Comment
Please, Sign In to add comment