playMaker

Author Topic: Game doesn't play after video finishes  (Read 6448 times)

Angawd

  • Playmaker Newbie
  • *
  • Posts: 1
Game doesn't play after video finishes
« on: October 07, 2024, 04:42:11 PM »
Hi all,

Forgive me if there is a very simple solution to this but I'm new to Playmaker and have tried everything I can think of to no avail.

I have imported a video into my game, with the render mode set to render texture. The video is the opening cutscene. I want the video to play as soon as the game starts, which works, but as soon as the video ends it does not leave the screen and I can't play the rest of the game. It gets stuck on the end frame of the video. I have the video acting as an overlay to the game itself, everything is in the same scene.

I have tried using the 'Video Player Stop' Playmaker command in State 1 directly after Video Play (the one with the 'Video Player Play' command), but it doesn't do anything and instead stops the video immediately right after it begins playing. I have opted to leave State 1 without any commands for now, but the video still does not leave the screen.
Here is a screenshot of my FSM setup:


Please let me know if further information is needed. Thank you in advance.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Game doesn't play after video finishes
« Reply #1 on: October 25, 2024, 04:33:01 AM »
Hi,

 can you show us what you do in these states?

-a quick hack is that if you know the duration of your video, you can make send an event with a delay of the duration of the video.

- you can get the number of frames of the video, and check on update the current frame and exit when the current frame is equal to the total number of frame ( don't put your video on loop though :) )


- there is a callback from the video player .loopPointReached  which will tell you when it reached the end of the video. have you tried to implement that?

- what set of video actions are you using?

Bye,

Jean