Problem with variables

  • Hi,

    I'm creating tycoon game in Construct 2(free edition) and I've got a problem with variables. The problem is that when on one of the layouts I change variables then when I go into another layout those variables are getting empty.

    Thank you in advice.

  • Use global variable

  • But I'm using global variables, but every time I go into another layout those variables are getting empty

  • Do you have logic to set them to something 'on start of layout', or logic that says to reset global variables?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry for not replying. I just repair it and it works well. The variables were changing every tick when it was on one of the layouts to the text or number that was wrote in a textbox. The problems have been starting every time I was changing the layout. Then the textboxes were just getting empty, but in code, the variables still were changing to the value in the textbox. I just added new 'if' which checks if the layout in which are these textboxes is currently open to the function which is responsible for changing the value of the variables.

    I'm sorry if I wrote this text kind of chaotically, but my English is no perfect and I'm still learning it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)