In Director 1.3 you can use params, like:
director:changeScene( { level="1" } , "level", "crossFade" )
How can you make level=“1” variable?
I tried:
local Level = "1"
local Test = "level=" .. string.char(34) .. Level .. string.char(34)
director:changeScene( { Test } , "level", "crossFade" )
Although i don’t get any errors, the level param on the receiving file is not detected. Test in this case contains level=“1”
The file level.lua starts with:
if type( params ) == "table" then
--
if type( params.level ) == "string" then
Level = params.level
print ("Level received: " .. Level )
end
end
Anybody know how to do this?
[import]uid: 50459 topic_id: 12726 reply_id: 312726[/import]