Forums

OverviewV-Play 1 Support › Retrieve customData from saved Levels

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5066

    Saims

    Hi,

    as you know, we are currently working on a level-editor for CrazyElephant. Each of our levels has different properties, like the number of shots, or the needed score for 1/2/3 stars.

    So we are using the customData in the saveCurrentLevel()-method, as follows:

    MenuButton {
            id: saveBtn
            text: "Save Level"
            mouseArea.onClicked: nativeUtils.displayTextInput("Enter name.", "Please enter a name for your level:", levelEditor.currentLevelName)
            anchors.right: parent.right
    
            Connections {
              target: nativeUtils
              onTextInputFinished: {
                if(accepted) {
                    levelEditor.saveCurrentLevel( {levelMetaData: {levelName: enteredText}, customData: {star1score: "340"}} )
                    scene.state = "editing"
                }
              }
            }
        }

    So my question is now, how can I access this customData from anywhere else?

    Or is there a better solution for our problem?

    #5067

    phil.jahoda

    So the question is how to get to the customData key-value pairs when the level is loaded e.g. with the LevelSelectionList?

    #5068

    Christian
    V-Play Team
Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support