Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

popScene closing game entirely

TheUnproPro

Boondoggle
Staff member
Resource Team
Partner
For some reason my scene doesn't close properly, when I try to pop it it simply closes the entire game instead of returning to the scene it was previously at. Can someone help me?

EDIT: Sec, providing details.

Ok so basically, the scene is set up in this way:

JavaScript:
function Scene_UppRomance() {
        this.initialize.apply(this, arguments);
    }
 
    Scene_UppRomance.prototype = Object.create(Scene_MenuBase.prototype);
    Scene_UppRomance.prototype.constructor = Scene_UppRomance;
 
    Scene_UppRomance.prototype.initialize = function() {
        Scene_MenuBase.prototype.initialize.call(this);
    };

    Scene_UppRomance.prototype.start = function() {
        Scene_MenuBase.prototype.start.call(this);
    };
 
    Scene_UppRomance.prototype.create = function() {
        Scene_MenuBase.prototype.create.call(this);
        //Some code here...
    };
JavaScript:
this.pop.setHandler("cancel", this.popScene.bind(this));
closes the game completely instead of just popping the stupid scene. I'm calling the scene from
the menu, also tried from a plugin command.



--EDIT--

I've re-written it and now it works just fine. I have no idea why, though...
 
Last edited:
Top