Cutscene Issue

sinbotsinbot Member Posts: 232
edited May 2017 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 Member Posts: 232

    Here is a screen shot from the program..

    imgur.com/a/00yH8

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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.Member Posts: 12,822

    @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 Member Posts: 232

    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 Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2017

    [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 Member Posts: 232

    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.