Best way to change global variables each level?

0 favourites
  • 6 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hey everyone,

    My game has about 50 levels/waves and for each level the global variables change depending on what level/wave the player is on. What is the most efficient way to change these variables? Below is a screen shot sample of how i currently have it working. There will probably be around 20 variables that change each time so other than setting them according to the current wave manually i would like to know if there is a better way. I have used CSVs in the past for stuff like this, but I'm new to construct.

  • This looks fine. You could add all the stats to CSV or JSON and import into an array and use the wave number as the array row number to make the event smaller (i.e. set TimeMin to array.at(CurrentWave,1), set TimeMax to array.at(Currentwave,2) but there is no downside really to applying the actions like you have them at the moment.

  • I should've mentioned you don't even need to import it, you can create the array file in Construct and load it into the array if you want a table of stats.

  • Thanks Lionz,

    Do you know if there is a good tutorial explaining JSONs or uploading CSVs. I would prefer that way so I can easily tweak the numbers as im testing.

  • See above I forgot to mention that you don't need to import from an outside source. You can create an array file in Construct then load it into the array and use the logic I mentioned where the row is the wave number. It's on the project bar at the bottom create array file and then load it into an array on start of layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you! I will give it a go.

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