Jump to content


Photo

Keeping Track?


  • Please log in to reply
2 replies to this topic

#1 xxgamenoobxx

xxgamenoobxx

    GMC Member

  • New Member
  • 35 posts
  • Version:GM8

Posted 04 March 2012 - 01:23 AM

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?
  • 0

#2 greenio3

greenio3

    GMC Member

  • GMC Member
  • 73 posts

Posted 04 March 2012 - 09:46 PM

You posted this in the wrong section. It should be in Novice & Intermidiate.
  • 0

#3 GreenMeteorTeam

GreenMeteorTeam

    GMC Member

  • GMC Member
  • 142 posts
  • Version:GM:Studio

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)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users