- Joined
- Mar 17, 2012
- Messages
- 1,694
- Reaction score
- 1,452
- First Language
- Portuguese
- Primarily Uses
This is an old known issue, I even suggested a fix on the MV Improvement boards but it seems it was miseed.
- Plugins Used?: None.
- Already Reported?:It was reported on the MV Improvement boards, but since the boar is not visible (at last I can't find it) I can't reply to it.
- Bug Explanation: When call the 'Play Moive...' event command, the event continues processing. Before someone says 'it is intentional', it is not, the maker do includes codes to make the game wait the video processing, but due to a bug it is ignored. This happens because, after the interpreter calls the movie, it turn on a flag to check if the video is playing, at every frame uptate, if the video is not playing, this flag is turned off, but since the video takes some time to load, it will not be playing at the first frame update, turning the flag off before the movie starts.
- Exact Steps on How to Replicate Bug: Make an event that plays a movie using the 'Play Movie' event command and only that, then try to move the character while the video is playing, once the video ends, you will notice that th
- Sample Project: View attachment Project1.rar
- Fix: To fix that, the game must wait until the movie is loaded, this can be done by changing the following functions on the rpg_core.js:
Graphics.playVideo
Code:Graphics.playVideo = function(src) { this._video.src = src; this._video._isLoading = true; this._video.onloadeddata = this._onVideoLoad.bind(this); this._video.onerror = this._onVideoError.bind(this); this._video.onended = this._onVideoEnd.bind(this); this._video.load(); };
- Graphics._updateVisibility
Code:Graphics._updateVisibility = function(videoVisible) { this._video._isLoading = false; this._video.style.opacity = videoVisible ? 1 : 0; this._canvas.style.opacity = videoVisible ? 0 : 1; };
- Graphics._isVideoVisible
Code:Graphics._isVideoVisible = function() { return this._video._isLoading || this._video.style.opacity > 0; };
Last edited by a moderator:

