i'm making a RPG and i've having one problem... whenever i exit a battle or go into a different room it resets my xp, gold, health and mana. how can i make it keep track universally?
Keeping Track?
Started by xxgamenoobxx, Mar 04 2012 01:23 AM
2 replies to this topic
#1
Posted 04 March 2012 - 01:23 AM
#2
Posted 04 March 2012 - 09:46 PM
You posted this in the wrong section. It should be in Novice & Intermidiate.
#3
Posted 05 March 2012 - 07:46 PM
But in answer to your question - use global variables.
To define a global variable write "global." before it, as if there were an object called global
So xp would become global.xp
Also be sure to set them at the beginning of the game, not the beginning of the room or the creation of an object. (Otherwise you'd be resetting them yourself every time that room is re-entered or that object is instanced)
To define a global variable write "global." before it, as if there were an object called global
So xp would become global.xp
Also be sure to set them at the beginning of the game, not the beginning of the room or the creation of an object. (Otherwise you'd be resetting them yourself every time that room is re-entered or that object is instanced)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











