Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

A Pokemon style cutscene [Unity 2D]

Discussion in '2D' started by BOBBI3-B, Aug 3, 2016.

  1. BOBBI3-B

    BOBBI3-B

    Joined:
    Jan 28, 2013
    Posts:
    4
    I was wondering is there was a way in Unity 2D to create a cutscene. Like when a player stops controlling the character and and NPCs can walk up to you. Is there anyway you could also make it to where it triggers once?
     
  2. alfaro190

    alfaro190

    Joined:
    Jun 2, 2014
    Posts:
    6
    yes just add a 2D collider to your NPC. Make a trigger then just have when the player walks into trigger disable controls
    of the player. If you only want it to happen once just add a Bool to make sure it only occurs once.
    could look something like this.

    Code (CSharp):
    1. bool TriggerOnce=false;
    2.  
    3. void OnTriggerEnter(other, Collider){
    4. if( other.tag=="Player"&&TriggerOnce==false){
    5. // call the function of what you want your player and NPC to do
    6. TriggerOnce=true;
    7. }
    8. }
     
    BOBBI3-B likes this.
  3. foxnne

    foxnne

    Joined:
    Apr 18, 2016
    Posts:
    59
    I think its entirely possible and not all that difficult.

    Slightly different, but in my project I have my input script, which holds any inputs I need to keep track of, and then I have a movement script, which grabs those inputs and moves the character. In the movement script I have a Enum called inputState, which can either be "enabled" or "disabled", and if its disabled, the movement script no longer grabs the inputs from the input script.

    I use this to execute dashing/dodging, in which I don't want to obey inputs until the quick dash is done.

    You could use a trigger and disable inputs in a similar way, then execute code to make the NPC do whatever you want the NPC to do, and then re-enable the input to the player. You could also have the player do whatever you want while this is happening.

    Also,
    is a great tutorial by Broxxar on how to use shaders to get the same type effect of transitions in Pokemon cleanly, if your next step is something similar to this where you want a true change.

    If you are changing perspectives, or assets, like pokemon, you could likely even switch scenes while the transition is black, or something similar.
     
    BOBBI3-B likes this.
  4. BOBBI3-B

    BOBBI3-B

    Joined:
    Jan 28, 2013
    Posts:
    4
    Thanks guys I'll check that out! I have another question about cutscenes. I want to do an intro like in A Link to The Past with scrolling still pictures and text how could that be done?




    A Link to my example :/
     
  5. BOBBI3-B

    BOBBI3-B

    Joined:
    Jan 28, 2013
    Posts:
    4
    Do you know any tutorial on how to make a dash function?
     
  6. ashley

    ashley

    Joined:
    Nov 5, 2011
    Posts:
    84
    I hope that last sentence was a pun ;)

    Anyway, you could animate it in any number of animation packages if you wish and just import it as a movie (as far as I know, haven't tried that myself) or you can use Unity's inbuilt animation tools. Most things are just moving around so you'd just be changing their position. The Unity Learn section would be a good way of getting to grip with the tools: https://unity3d.com/learn/tutorials/topics/animation

    There's also a recommendation about how to have letters appear one at a time like they do in the intro here: http://answers.unity3d.com/questions/219281/making-text-boxes-with-letters-appearing-one-at-a.html Not sure if there's a better/more 'in-built' solution in Unity now as the suggestion is 4 years old (and will still work, but unsure if there's now some kind of inbuilt setting in Unity, not really done too much with the animation side of things).

    Good luck with the project :)