In my main.lua I have the first line as “require othergame”
where othergame.lua is a standalone game.
When I press the “play game” button all I get is:
x:123 y:123 {or some 3 digit numbers}
nil
Then Corona exits immediately.
It is going to function:
local function showxy(event)
if(event.phase==“began”)then
print("\tx: “…event.x…” y: "…event.y)
end
end
but not to:
local function startothergame(event)
if(event.phase==“began” and playgameup.alpha==1 and othergame.gameActive==false)then
if(bInGame==true)then return end
bInGame = true
othergame.gameActive = true
playgameup.alpha = 0
local function launch()
if(othergame.started==true)then
othergame.bMenu = true
othergame.gameActive = true
else
audio.fade({ channel=1, time=1, volume=100 } )
audio.fade({ channel=2, time=1, volume=0 } )
othergame.runGame()
othergame.gameActive = true
end
end
timer.performWithDelay(300,launch)
end
end – function startothergame(event)
This code worked before with one game. I modified it to use othergame.
Thanks in advance for your comments. [import]uid: 51895 topic_id: 31162 reply_id: 331162[/import]