Loading parameters into storyboard

Guys, i need some help here. Hope that you guys are able to help me up with it.

Now im having difficulties on passing a set of values into my game. I am using storyboard mode to create my game. My game code structure is seperated into several files - main.lua, game.lua, start.lua and restart.lua. What i wanted to do is every time i load the game, it will be initialized by different set of values. For example, every time i started the game, the size  and speed of the obstacles will be different. How am i supposed to do that. 

In my main.lua

display.setStatusBar(display.HiddenStatusBar)

local storyboard = require “storyboard”

storyboard.gotoScene(“start”)

Other lua files will include this

local storyboard = require (“storyboard”)

local scene = storyboard.newScene()

How could i load different sets of randomly generated param (x,y,z) into the storyboard?

Thanks guys. Very much appreciated.

Hello @eryc1216,

As a first note, if you’re not too far into development of this game, I suggest that you use Composer, not Storyboard. Composer is the official successor of Storyboard, and at some point Storyboard will be deprecated and unsupported.

http://docs.coronalabs.com/guide/system/composer/index.html

That guide should also give you details on how to handle variables and pass them between scenes.

Best regards,

Brent

Hello @eryc1216,

As a first note, if you’re not too far into development of this game, I suggest that you use Composer, not Storyboard. Composer is the official successor of Storyboard, and at some point Storyboard will be deprecated and unsupported.

http://docs.coronalabs.com/guide/system/composer/index.html

That guide should also give you details on how to handle variables and pass them between scenes.

Best regards,

Brent