Forum rules - please read before posting.

Making Video Skippable (using @Alverik's Custom Video Player Action)?

So when you click to start the game, it sends you to this scene. I have this scene set up with a "OnStart" Cutscene which goes into effect right away. The scene is set up basically just to play a video full screen using @Alverik 's custom action script and the Unity VideoPlayer component by having the camera face a full screen plane.(Part of the reason I have this video clip playing in a standalone scene is because I need to have different components on the camera - in other scenes I have a black and white color correction filter on the camera but I want this to play in color.)

It totally works, but I need to add a way to hit a key (spacebar?) to be able to skip the video. It's fun to watch the first time you play the game, kind of annoying to watch if you are playing a second time, and really tedious if you are playtesting over and over!

Any advice on how to add the ability to skip the rest of the video with a keyboard input? I saw that there is a Input: Check Button action, but I'm not sure how to get that to combine with either letting the video Play until Finished or to skip it midway. I thought about doing an Engine: Wait on the video instead of Play Until Finished, but I have no way of knowing how much will have played at the moment the player presses the button and that action gets checked.

Thanks for your advice!

imageimage

Comments

  • edited May 2017
    Umm... try adding an ActionList:CheckRunning at the start of your actionlist, then tick Check Self is Skipping. If the condition is not met do the normal actions. If the condition is met (self is skipping), then stop playback using the custom action and then switch the scene. AFAIK You should be able to use AC's cutscene skipping function if you do this (if you haven't you can create an input for it, just name it as shown in the Available Inputs section in the Settings Manager - but I think it's called EndCutscene). 

    For cutscenes that you don't want people to be able to skip, but which you yourself will want to, I'd recommend to use a bool global variable instead (like: IntroHasPlayed), then just use a Variable:Check at the start of your cutscene, if it's false, run the video/cutscene, else just switch scenes (or do nothing). That way you can just go and change the initial value of the variable in the Variables manager whenever you want to "force skip" the cutscene or video.

    Edit: I'll try to think of a way to do it directly in the action, but right now I'm a bit busy so it may take me some time. sorry.
  • Be aware that the recently-release AC v1.57 includes official support for the Video Player component via the "Engine: Play movie clip" Action, which allows you to define a dedicated input key for skipping the video.
  • @ChrisIceBox Woo! Downloading the latest AC update right now. Thank you so much!
  • edited May 2017
    @ChrisIceBox  Just tried out the new Engine:Play Movie Clip with the Video Player option. That made making the movie skippable very easy! Thanks!

    One really cool feature in the custom action script that @Alverik made for using the Video Player was the ability to not just target the Video Player object, but to also choose which video clip would play on that object. Since I've been doing long conversations with video, that allowed me to use the same Video Player "screen" plane but switch out what was playing on that video player screen based on the dialogue response the player chose. Do you think you might add that functionality to the Engine: Play Movie Clip action in a future update? I has been a really useful feature for me.

    image
  • I'd considered it, but that also means the complexity of having to incorporate such changes into the "Remember Video Player" component, which has to be able to support any changes made to it via the Action.

    You can always continue to use @Alverik's Action to change the clip, of course - and I can amend his script to work with parameters if you wish.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.