GML NPC Cutscene?

Discussion in 'Programming' started by Coffeepugs, Sep 14, 2018 at 8:20 PM.

  1. Coffeepugs

    Coffeepugs Member

    Joined:
    Friday
    Posts:
    3
    So I'm recreating Undertale for the sake of practice, but im changing it to the time chara fell down. Everything is going well so far and i fixed my last problem (i think)

    But now i want chara to walk into the second room, take a few steps, and then have a cutscene start where asriel starts talking. After that, i want the player (chara) to follow him.

    I dont really know how to code this and i cant find this anywhere. Does anyone have advice?
     
    Yoshibel likes this.
  2. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,106
    This series from Friendly Cosmonaut is the best one out there right now I think:

     
    Coffeepugs and Phil Strahl like this.
  3. ethian

    ethian Member

    Joined:
    Apr 19, 2018
    Posts:
    145
    Recreating Undertale and even mentioning Chara and Asriel? Cutscene? Let me make the necessary assets for an Undertale cutscene.

    I was hgoing to program this in my game, now the thing came forward!

    Meanwhile show me how you're making your Undertale... then i show up how i'm making my game...
     
    Coffeepugs likes this.
  4. OblivionSkull21

    OblivionSkull21 Member

    Joined:
    Sep 26, 2017
    Posts:
    131
    I use paths. Just give Chara a path to follow. When she reaches a certain point in the path, set the path speed to 0. When she needs to change direction, either have her follow a new path or set the speed back to whatever it was (have it all in ONE path).

    When they reach Asriel, set the path speed to 0 once more. Initiate Asriel's dialogue. Dialogue is a very difficult task in GM. If you are wanting the dialogue to be exactly like Undertale's (typewriter-effect, beeps for each character) this may take some time. Otherwise, just use draw_set_color, draw_set_font, and draw_text to make the line appear on the screen instantly. If the player presses space (to continue the text), have it draw something else. It may take some time to accomplish.

    Once Asriel is done talking (determine this based on if there are any lines left), give him a path to follow (i.e. Exit the room). Then give Chara a new path to follow him (or set the path speed back to normal. Again, it's more efficient to do it all in ONE path).

    Basically, paths.
     
  5. ethian

    ethian Member

    Joined:
    Apr 19, 2018
    Posts:
    145
    Paths? I knew it!

    I'll explain later how i do the cutscenes... it includes the dialougues...
     
  6. Coffeepugs

    Coffeepugs Member

    Joined:
    Friday
    Posts:
    3
    Oh thank you so much! I' ll definitely try this!!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice