Initialize the Variables

Do we need to initialize our variable to 0, true/false, etc even each scene in the beginning would do it for you? Thanks.

K.C

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2014
    When you change scene any global variables (game attributes) will remain so for eg if you have a Boolean called level complete then change scene level complete will still be try so you need to change things like this either right at the start of the next scene or just before you change scenes.

    Remember gs reads from the bottom up so if you have something like change level complete to false it would be best to put it on the bottom layer bottom of the list.

    Darren.
Sign In or Register to comment.