MV 1.3 - Events don't stop processing while video is playing

Victor Sant

Veteran
Veteran
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 BugMake 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:

kozemoze3

Villager
Member
Joined
Mar 26, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Is this still a thing? i cant seem to get a hang of it ... still wont work for me!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top