GameSalad

Cutscene Issue

sinbotsinbot Posts: 11Member
edited May 15 in Working with GS (Mac)

Hey GS peeps.. trying to program a cutscene. Want to hit RETURN to progress to next frame , otherwise frame should automatically proceed to the next after 15 seconds.

It basically works except the problem is that for either option when you progress to the next frame (starting with the first) it switches immediately to the last CHANGE IMAGE.

Anyone have any idea how I can make it progress 1 IMAGE at a time???

TY

Comments

  • sinbotsinbot Posts: 11Member

    Here is a screen shot from the program..

    imgur.com/a/00yH8

  • tatiangtatiang Posts: 10,971Member, Sous Chef, PRO, Senior Sous-Chef

    Your rules are essentially this:

    When return key is pressed
         immediately change to image A
         immediately change to image B

    When return key is not pressed
         immediately change to image A
         immediately change to image B

    There's no delay between A and B so it's going to appear as though the image just changed to B. How exactly do you want it to work? That is, what kind of delay do you want between the two images?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Posts: 12,711Member

    @tatiang said:
    When return key is not pressed
         immediately change to image A
         immediately change to image B

    The otherwise section (when return key is not pressed) is wrapped in a timer, so doesn't happen immediately (/pedant ;) ) . . . . but this doesn't detract from your main point that A will never show as the rule immediately changes the image to B before the frame (1/60th/sec code cycle) is drawn.

  • sinbotsinbot Posts: 11Member

    Correct. Is there a way to make it go 1 frame at a time every time player clicks ENTER or lets it play out based on the timer? I just want the player to have the option to hit ENTER to skip to the next frame. There are 24 of them for this particular scene and it will just skip to the last one : (

  • tatiangtatiang Posts: 10,971Member, Sous Chef, PRO, Senior Sous-Chef
    edited May 15

    [so hoping I can beat @Socks to the punch...]

    Yes, you can number your images like this: cutscene1.png, cutscene2.png, cutscene3.png, etc. and create an integer attribute called something like game.frame with a starting value of 1 and then each time the player clicks:

    Change attribute game.frame to game.frame+1
    Change attribute self.Image to "cutscene"..game.frame

    As for the timer, consider using an Animate behavior to automate the display of multiple frames. Then again, if you want the player to be able to manually change frames, maybe not Animate... maybe just this:

    Timer for 15 seconds
    Timer every 24/15 seconds
         Change attribute game.frame to game.frame+1
         Change attribute self.Image to "cutscene"..game.frame

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • sinbotsinbot Posts: 11Member

    TY Tatiang... I have put the images in sequential order and I understand your method. The problem is I am not sure where to create the integer and where I should assign the attribute exactly. Would you be able to post up a screenshot? Would really appreciate!

Sign In or Register to comment.