How to Make a Icon Show A Video

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
User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

How to Make a Icon Show A Video

#1 Post by KairuKyun »

Hello I would like help on how to make an icon in my Ren'py game show a video? Any ideas?
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

CupCakeComedy
Regular
Posts: 26
Joined: Sun Feb 22, 2015 7:46 pm
Contact:

Re: How to Make a Icon Show A Video

#2 Post by CupCakeComedy »

You mean a button that you can press to show a video?
And a full sized video playing in a game menu or something overlying the actual game?

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#3 Post by KairuKyun »

Yes Exactly.
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#4 Post by KairuKyun »

*Bump
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#5 Post by KairuKyun »

Hello anyone got an idea
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality


User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#7 Post by KairuKyun »


I need a little more explanation please. Plus i want to be in game and click on an icon not a gallery. Thank you for the help though.
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#8 Post by KairuKyun »

Bump
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: How to Make a Icon Show A Video

#9 Post by xavimat »

You could use a screen and put an imagebutton in it. Check the doc: http://renpy.org/doc/html/screens.html
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#10 Post by KairuKyun »

xavimat wrote:You could use a screen and put an imagebutton in it. Check the doc: http://renpy.org/doc/html/screens.html
I did that but when i showed the screen it would just play the video as the game opened.
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: How to Make a Icon Show A Video

#11 Post by xavimat »

KairuKyun wrote:
xavimat wrote:You could use a screen and put an imagebutton in it. Check the doc: http://renpy.org/doc/html/screens.html
I did that but when i showed the screen it would just play the video as the game opened.
Use two screens. One only with the imagebutton that opens the second that has the video.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#12 Post by KairuKyun »

Okay ill try
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#13 Post by KairuKyun »

Subject: How to Make a Icon Show A Video
xavimat wrote:
KairuKyun wrote:
xavimat wrote:You could use a screen and put an imagebutton in it. Check the doc: http://renpy.org/doc/html/screens.html
I did that but when i showed the screen it would just play the video as the game opened.
Use two screens. One only with the imagebutton that opens the second that has the video.
How would I make a screen that has the image button and when i make a screen for the video each time i open the game the video plays, then i tried this still no luck though.

Code: Select all

screen vid:
     vbox xalign 0.5 yalign 0.5:

        imagemap:
            ground "locked.png"
            hotspot (207,394,300,77) action $ renpy.movie_cutscene("shuttle.ogv")
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: How to Make a Icon Show A Video

#14 Post by xavimat »

Well, I'm trying and still can't get it working.
I think this code should work, but it plays the video in every interaction (I think it's called "interaction").
It's maybe something related to "prediction" ? I'm clueless here.

Code: Select all

label start:
    show screen vid
    pause
    e "You've created a new Ren'Py game."
    e "Once you add a story, pictures, and music, you can release it to the world!"
    return

screen vid():
    textbutton "Video" action Show("vid2")

screen vid2():
    $ renpy.music.play("small.ogv", channel='movie')


## Things I've already tried:

# $ renpy.movie_cutscene("small.ogv")
# show screen vid nopredict
# config.predict_statements = 0
# $ renpy.stop_predict()
# renpy.stop_predict_screen("vid")
#screen vid():
#    textbutton "Video" action renpy.call_in_new_context("show_video")
#
#label show_video:
#    play movie "small.ogv"    
#    return
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
KairuKyun
Veteran
Posts: 286
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more, Warped Reality
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: How to Make a Icon Show A Video

#15 Post by KairuKyun »

What if we just made a button go to a label? I dont know how I would do that though.
EDIT: Never Mind i see where you tried that but maybe we can try something else with that.
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.co
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]