Jump to content


Photo

Need some help with variables


  • Please log in to reply
2 replies to this topic

#1 sachonski

sachonski

    GMC Member

  • New Member
  • 8 posts
  • Version:Unknown

Posted 29 July 2012 - 09:10 AM

Hi there guys, im kinda new in the world of the game creation. And I have a little problem with a game I'm making:

In the room A, I've got 2 doors, that send me to the room 1 and 2. I would like to know how to make a change in the room A, from the room 1 (when level 1 ends, door of level 2 opens - its in the room A)

thanks a lot.
  • 0

#2 TheouAegis

TheouAegis

    GMC Member

  • GMC Member
  • 4705 posts
  • Version:GM8

Posted 29 July 2012 - 06:21 PM

YoYou can make a global variable that tracks if the door is locked (0) or unlocked (1). You'll need either a bunch of global variables for each door in the game that has this attribute or use a global array (with each index pertaining to a specific door). If you have "levels" that can't be accessed later, you can limit the global variables/array to just the doors on one level and recycle the variables for the later levels.
  • 0

#3 sachonski

sachonski

    GMC Member

  • New Member
  • 8 posts
  • Version:Unknown

Posted 29 July 2012 - 11:47 PM

great. that really helps. Ill try it
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users