Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 1 Support › Question about LevelEditor (saving a loaded level)

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

    Arend

    Hi again,

    I’m setting up my game project, including the LevelEditor. What I want to accomplish is the following:

    – I want to load a level

    – Then be able to play it and/or edit it

    – If edited, I want to save the level, so next time the game starts I see the changes

     

    From what I understand, levels can be designed either in QML or get loaded from JSON. As I understand it, the LevelEditor only supports saving levels in JSON, so I should be using JSON for my scenario. By doing so, I’ve been able to accomplish the first two steps of what I want. But now I have a problem saving the level I loaded from JSON, because when I do so I get this error:

    <!–StartFragment–>ERROR: LevelEditorLogic: no LevelBase loaded – either no LevelLoader defined or the loaded level was not derived from LevelBase as it has no levelData property!?<!–EndFragment–>

    So now my question: how do I define a LevelBase in such a way it can be recognized by the LevelEditor for the level loaded from JSON, as I think the LevelBase is only used with QML levels? Am I overlooking something?

     

    Thanks!

    #7190

    Arend

    Ah, nevermind. I was just forgetting the call to┬álevelEditor.exportLevelAsFile() which was why my level didn’t get saved. I still get the error mentioned above, but apparently it’s causing any serious harm.

     

    I still think it’s slightly cumbersome that exports always go to the Documents folder, but nothing a symlink can’t fix ­čÖé

     

    Cheers!

    #7194

    Christian
    Felgo Team

    Hey there,

    nice that you could figure it out by yourself ­čÖé

    If you run into any other problems, feel free to ask.

    Cheers,
    Chrisu

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.