Forum rules - please read before posting.

2D Cutscenes playing onClick in game engine

Hi there. I know it is very nooby to ask this kind of questions, but unfortunately I can't find the answer in the tutorials. I'm writing a technical scenario for my 2D game based on my already published book. I want the cutscenes for the game to be comic book like, I've already created a visual of how it will look like, showing it below

I want to find out how can I play the cutscenes for example on a static black background with adding some pictures in it like in a comic book but inside unity engine, I definately don't want to use already rendered video instead, cus I want each picture to be shown only when user tap on the smartphone screen or click on pc.
I guess I should use timeline for it? But I can't understand how I need to use the cutscene mechanism inside AC for my cutscenes. If I described it badly, you could have a look on the game, which done cutscenes the exact way I want, sending the youtube video for it.

You can watch the first cutscene on 00:25
Pictures are being shown here onClick.

Thank you!


  • edited April 15

    Yes, Timeline would be the tool to use for this.

    The actual creation/animation of the cutscenes this way wouldn't need to involve AC for the most part - the use of Activation/Animation tracks etc are all built into Unity itself. If you're unfamiliar with Timleine, I'd recommend trying it out without AC in a fresh project - it's intuitive, so you'll pick things up quickly.

    For organisation, you're best off creating a new GameObject in the scene for each such sequence - and then attaching all the art necessary for it (including the black background) as a separate sprite child object. Parenting them to the root sequence GameObject helps to keep them separate from the rest of your game.

    To avoid moving the sequence art from getting in the way of your main gameplay art (and vice-versa), you can move everything off to the side. You'll need to make sure your camera is also shifted over, but with AC you can do this with a regular GameCamera, and then incorporate AC's MainCamera track to snap to this camera while it runs.

    To have the sequence run within AC, you can use the Engine: Control Timeline Action. A video explainer can be found here, and the 3D Demo relies on it for its own opening and closing cutscenes. The same principles can be applied to 2D, however.

  • Oh thank you, will try it out but I didn't understand how can I make the art come out when User is clicking on the mouse button or tapping on the screen on smartphoen?

  • edited April 18

    Ah, apologies - I missed that point.

    You could technically split each break in the sequence into a separate Timeline, and then use a chain of Input: Check and Engine: Control Timeline Actions to have each wait for a given input before continuing.

    If you're doing it for each line, though, it'd naturally be easier to have a single Timeline pause on a given frame - which Unity unfortunately doesn't make quite as easy as it sounds like it should be. Custom scripting would be necessary in this case - a discussion on the Unity site about this can be found here:

  • Sorry, I coulnd't understand the differenc between first and second method, can't undertand what you ment saying "line".

    Will the first method work for the idea I provided with the picture for cutscene?

  • By "line", I'm referring to speech lines - individual lines of dialogue.

    The first method will work just fine if you have no need for the user to click through each panel. If the whole sequence can play without awaiting input, that can be done very simply.

    If you need each panel to await input from the user, things will be more complicated and you'll need to look into the 2nd/3rd methods.

  • Thank you so much! I understood it now. As I see for me who is 0 in code is the best option to forget about Cutscenes driven by Clicks.
    I also think about maybe creating a video in a usual video editor program is the easier option for what I need? Cus creating cutscenes in Unity will be more difficult?
    What do you think about it, is it ok for video implementation in Unity or I will get problems with it?

  • Unity supports videos with its Video Player component, and AC can control playback with the Engine: Play movie clip Action.

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.