create a secret scene

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.
Message
Author
viper
Newbie
Posts: 11
Joined: Mon Jan 21, 2019 4:47 pm
Projects: galaxy
Contact:

Re: create a secret scene

#16 Post by viper »

i have the screen secret not center (not full screen) i can see the previous scene behind and when i click i dont continue the story but jump to "cache"

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: create a secret scene

#17 Post by Imperf3kt »

Perhaps a clearer understanding of what you wish to achieve, is necessary.

From what you've told me, you want a player to click an area of the screen and an interaction pops up, for example, the background is a bookshelf and clicking a certain book makes a small image appear on screen, a few lines of dialogue, and then return to the previous scene?

Or is it more like a map, click an island and the scene changes, a few lines of dialogue show, then you return to the point you left off and the story continues?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

viper
Newbie
Posts: 11
Joined: Mon Jan 21, 2019 4:47 pm
Projects: galaxy
Contact:

Re: create a secret scene

#18 Post by viper »

first thank you for all the time you spend!!
i will try to be more clear but i'm limited with english.

imagine the scene is a corridor with a door, 2 men walk and talk, during the conversation, i would like if the player click on the door that the man open the door and see the secret scene.
but if the player dont click on the door the story continue.
i dont want to ask the player to do that like "open the door" "dont open the door"

if it can help my game is just with scene like that:
scene1
"bla bla"

scene 2 with dissolve
"bla bla"
etc...

viper
Newbie
Posts: 11
Joined: Mon Jan 21, 2019 4:47 pm
Projects: galaxy
Contact:

Re: create a secret scene

#19 Post by viper »

so maybe it's not possible?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: create a secret scene

#20 Post by Imperf3kt »

The code I posted before is working nicely for me, is it not what you were wanting?

Just to be clear, because I did make a few mistakes while typing it, the code should look like this:

Code: Select all

screen secret() :
    modal False

    imagebutton:
        idle "secret.png"
        hover "secret.png"
        focus_mask True
        xpos 0
        ypos 0
        action Call("cache")
        
label start:
    show screen secret
    "bla bla"
    hide screen secret

    scene ver6
    "story continue"
    "blah blah"
    "story end" 
    return

label cache:
    hide screen secret
    scene ven2
    "secret scene goes here"
    return

https://puu.sh/CClbB/48e6c0ae31.mp4
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users