[solved] How do I keep loaded data in globals?

  • I'm loading from local storage. The load screen goes fine and in the inspector I can see it has loaded the data into the globals.

    Now, I don't know if this is the problem, but the main event sheet is where the globals are defined. After loading, I go to the main page/event sheet and then it gets the value of the global there as the global is defined (say if I set 'Scenario' to 777, then it goes to 777 even though I loaded 40 from the file on the previous sheet).

    Thing is I've made a game already where I defined globals on the main event sheet and it'd load fine (has something changed)

    I can't move the globals without it ripping them all out of the program thus far (even if I have a duplicate copy of the globals in my load event sheet).

    Is it the globals and where they are defined that is the problem?

    Edit: Okay, my error...somehow. I had it looking for the scenario data on a local variable 9, but after that if it was on 9 I would make it go to the main page. Plan was it'd load the data, then go to the main page. Seems it wasn't loading the scenario data at all. I think I had an order issue - I had the 'goto main page' inside the local variable increment rather than just below it. Anyway, my mistake.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)