Forums

OverviewV-Play 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
    V-Play 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.

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