Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Trying to play a preloaded movie that was playing, after the game menu was closed and open causes a crash "Cannot set property '_parentID' of null"

I fixed this by adding the following code. in the plugin


const _Scene_Map_terminate = Scene_Map.prototype.terminate;

Scene_Map.prototype.terminate = function() {

_Scene_Map_terminate.call(this);

if (this._spriteset._videosContainer) {

this._spriteset._videosContainer.removeChildren();

}

};

(1 edit)

Where did you add this code exactly? (what line number).

Does the video still deactivate when opening/closing the menu?

(1 edit)

anywhere, really. I added after Spriteset_Base.prototype.removeVideo so line 320.

This does not fix videos being deactivated; you 'd have to write some additional code to track which ones were playing and restart them upon return to the Scene_Map.

I had to do this for a game jam so I just used GalV's  MZ Load Common Event plug it to have a common event play my video upon return to the map screen. It continues from the same frame it left off on, as far as I can tell.