Trying to create an Animated Actors behind the scenes section for my game.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
arlj11
Newbie
Posts: 10
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Trying to create an Animated Actors behind the scenes section for my game.

#1 Post by arlj11 » Mon Jan 06, 2020 12:58 pm

I want to create an Animated Actors behind the scenes section for my game called "Inside the Character Studio" ICS for short. It is meant to be a funny side story with the charaters talking about the scenes like they are actors playing parts. The episodes unlock after the player have seen certain scenes in that episode.

I used the Side Story or Sub story are unlocked when ONE or TWO MORE endings are completed. - isobellesophia from the cookbook section to build it.

The problem I am having is getting it to return to the ICS Menu after the episode plays. The return function starts the game and everything else I try kicks out an error.

Thank you in advance.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#2 Post by isobellesophia » Tue Jan 07, 2020 7:37 am

Hello! Can you exactly show the code for that? I am the creator of that code you've been looking into.

And plus, or maybe showing the ICS menu you've been talking about

And what is the error showing?
I am a friendly user, please respect and have a good day.


Image

Image


arlj11
Newbie
Posts: 10
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#3 Post by arlj11 » Tue Jan 07, 2020 12:15 pm

Here is the code for the Menu and the intro. With the return it give no error it just starts the game. I would like it to go back to the ICS Menu after playing the episodes.

Code: Select all

### SCENE GALLERY! ##########################################
screen ICS():
    tag menu
    use extras_menu("Inside the Character Studio"):
        grid 1 3:
            style_prefix "gslot"
            xalign 0.5
            yalign 0.5
            spacing gui.slot_spacing
            ## scene 1
            if persistent.credits_seen:
                textbutton "Introduction" action Jump("ICSIntro")
            else:
                text "The episode is not unlocked yet."

            if persistent.IntroWatched:
                textbutton "Main Menu" action Jump("ICSMainMenu")
            else:
                text "The episode is not unlocked yet."

            null

label ICSIntro:
    scene ICS
    Ka "Welcome to Inside The Character Studio."
    Ka "Here we will be giving you a behind the scenes look at what it took to make 4 Wins possible."
    Ka "We hope you enjoy."
    $ persistent.IntroWatched = True
    return

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#4 Post by isobellesophia » Wed Jan 08, 2020 6:45 am

How about this.. replace the return into this instead.

Code: Select all

$ renpy.end_replay()
If not, then replace the Jump action into Replay..
I am a friendly user, please respect and have a good day.


Image

Image


arlj11
Newbie
Posts: 10
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#5 Post by arlj11 » Wed Jan 08, 2020 12:13 pm

That did the trick. I had to also replace the Jump() with Replay() so Ren'Py would see the end_replay.

Thank you for your help.

arlj11
Newbie
Posts: 10
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#6 Post by arlj11 » Thu Jan 09, 2020 2:50 pm

Olay. Now I have a new problem.

Somehow the when the episodes are unlocked, the button is grayed out and unclickable. I deleted all the Persistent data to reset it and check it out.

But the player needs to play the Introduction to start unlocking all the other episodes, and the Introduction button is grayed out and unclickable.

Made no changes to any of the screens.

arlj11
Newbie
Posts: 10
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#7 Post by arlj11 » Thu Jan 09, 2020 11:13 pm

I just realized what's happening.

The Replay() function only works when the label has been viewed at least once. Since these labels will never be seen in the main game, Replay won't work.

So I have to use the Jump() function. Which leaves me back at square one.

I wonder if this should be brought up to the devs as a bug?

User avatar
PyTom
Ren'Py Creator
Posts: 15478
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#8 Post by PyTom » Fri Jan 10, 2020 5:53 pm

It's not a bug. Replay takes a locked= argument that determines if the Replay is locked or not. You could give it locked=False if you want it to always be unlocked.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

arlj11
Newbie
Posts: 10
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Trying to create an Animated Actors behind the scenes section for my game.

#9 Post by arlj11 » Sat Jan 11, 2020 3:04 pm

That did the trick. It works now.

Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users