Tap RPG Questions

So I’ve been working on a “Tap RPG” app or what some may call a Gacha game.

I was wondering how to do 2 things.

-I do use robmiracles simple save and load function

  1. Is changing an image from scenes.

For example on my main screen Ill have an image of a monster then i’ll go into my team scene and click on a monster and after exiting that scene whichever monster I clicked on would appear on my main screen and remove the other monsters.

menu->team->menu with new monster 

What I believe I have to do is create a table with all the monsters I have on my team and when one is clicked be saved into a JSON file. And have that JSON file save it and when going back to the main menu screen it read/loads the JSON into displaying the new image.

  1. Adding images to scroll view

So after my player collects a new item i want the item to display on bottom of the item on top of it.

I do have it so the number of items is saved, but my only problem is adding the image onto the bottom so it can continuously/automatically keep going 

A. Pass custom data that should be transferred to the scene.

Example from documentation

-------------------------- -- From "scene1.lua" -------------------------- local customParams = {     var1 = "Hello ",     var2 = "World!" } composer.gotoScene( "scene2", { effect="fade", time=800, params=customParams } ) -------------------------- -- In "scene2.lua" -------------------------- local composer = require( "composer" ) local scene = composer.newScene() function scene:create( event )     print( event.params.var1 .. event.params.var2 ) end scene:addEventListener( "create" )

See more:

B. Use new feature of Composer to Setting/Getting Variables from another Composer scene.

To set variable playerName use 

composer.setVariable( "playerName", "Zorron" )

To retrieve the variable from another scene use

local playerName = composer.getVariable( "playerName" )

See more:

ldurniat

Oh I understand ! I actually did not know about the new feature Corona implemented ! Will take a look on that before deciding which is more convenient 

A. Pass custom data that should be transferred to the scene.

Example from documentation

-------------------------- -- From "scene1.lua" -------------------------- local customParams = {     var1 = "Hello ",     var2 = "World!" } composer.gotoScene( "scene2", { effect="fade", time=800, params=customParams } ) -------------------------- -- In "scene2.lua" -------------------------- local composer = require( "composer" ) local scene = composer.newScene() function scene:create( event )     print( event.params.var1 .. event.params.var2 ) end scene:addEventListener( "create" )

See more:

B. Use new feature of Composer to Setting/Getting Variables from another Composer scene.

To set variable playerName use 

composer.setVariable( "playerName", "Zorron" )

To retrieve the variable from another scene use

local playerName = composer.getVariable( "playerName" )

See more:

ldurniat

Oh I understand ! I actually did not know about the new feature Corona implemented ! Will take a look on that before deciding which is more convenient