Switching view between videos

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
TOASTER_JACK
Newbie
Posts: 2
Joined: Mon Oct 07, 2019 1:12 pm
Contact:

Switching view between videos

#1 Post by TOASTER_JACK »

Hey, i'm having some problems to switch views in a video

basically i would like to play a video, have a menu that give me a choice to switch a view and call another video (video2), and in that other video(video2) i would like a menu to go back to that previous video (video1).

i managed to make the switch between video1 to video2 but when i want to go back from video2 to video1, video1 won't load and the screen get stuck on video2 while the menu is the one in video1.

here's my code:

Code: Select all

show tj1 with fade # video1

label tj_v1:

    show tj1
    
    menu:
        "view 2":
            jump tj_v2
        "Continue":
            jump s2continue
            
label tj_v2:

    show tj2 # video2
    
menu:
    "view 1":
        jump tj_v1
        hide tj2
    "Continue":
        jump s2continue
        
label s2continue: # label to continue after the video
    scene s2p39
        
i tried using call instead of jump but it didn't worked so i'm kinda confused right now as to what to do ?

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Switching view between videos

#2 Post by Per K Grok »

TOASTER_JACK wrote: Mon Oct 07, 2019 1:37 pm Hey, i'm having some problems to switch views in a video

basically i would like to play a video, have a menu that give me a choice to switch a view and call another video (video2), and in that other video(video2) i would like a menu to go back to that previous video (video1).

i managed to make the switch between video1 to video2 but when i want to go back from video2 to video1, video1 won't load and the screen get stuck on video2 while the menu is the one in video1.

here's my code:

Code: Select all

show tj1 with fade # video1

label tj_v1:

    show tj1
    
    menu:
        "view 2":
            jump tj_v2
        "Continue":
            jump s2continue
            
label tj_v2:

    show tj2 # video2
    
menu:
    "view 1":
        jump tj_v1
        hide tj2
    "Continue":
        jump s2continue
        
label s2continue: # label to continue after the video
    scene s2p39
        
i tried using call instead of jump but it didn't worked so i'm kinda confused right now as to what to do ?



This part

Code: Select all

menu:
    "view 1":
        jump tj_v1
        hide tj2
change that to

Code: Select all

menu:
    "view 1":
        hide tj2
        jump tj_v1
or tj2 will not be hidden and will be shown on top of tj1, so it will appear as if tj1 is not shown.

That at least is what I think is happening. Not tested.

TOASTER_JACK
Newbie
Posts: 2
Joined: Mon Oct 07, 2019 1:12 pm
Contact:

Re: Switching view between videos

#3 Post by TOASTER_JACK »

Yup, it was only a misplace, i feel silly now :/

Thanks for the help, appreciate it !

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]