I am currently making an interactive music album using Ren'Py for my current University project.
What I want to do is design a series of panels which will be shown on the screen at the same time, and when one is clicked it will change with another image, while the unclicked images are left unchanged
(I used this video as concept research as this is the type of thing I want, but no transition of sweeping across the page, they will all be in the same position on screen http://jeffbuckley.com/interactive/)
Is there any code I could use which does this, or will I have to turn to other software?
And will I also be able to use simple animations on the clickable images, such as the bobbing of a figure, or would the images have to be still PNGs?
I thought I could have a series of images showing the different parts of each songs story, and when clicked they would show another perspective of the same story, and then once one song is finished, the game would jump to the next scene which would be when the next song on the album would play
interactive images
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.
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.
- Ocelot
- Lemma-Class Veteran
- Posts: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: interactive images
Nothing really hard about that. A bunch of buttons which will call a python function which will assign next displayable in list to currently displayed one. And a simple timer to change scenes/songs (and if there is a callback when track finishes playin, it is even easier)
As for animations, you can either use movie sprites, meaning that you will have to turn your gif into videofile or disassemble it to several frames and build animation inside RenPy using ATL.
As for animations, you can either use movie sprites, meaning that you will have to turn your gif into videofile or disassemble it to several frames and build animation inside RenPy using ATL.
< < insert Rick Cook quote here > >
- Izzayuh
- Newbie
- Posts: 15
- Joined: Sat Mar 19, 2016 12:06 am
- Projects: Masked, Lovetale
- Tumblr: izzycle
- Deviantart: izzysdoodles
- Contact:
Re: interactive images
Ocelot wrote:Nothing really hard about that. A bunch of buttons which will call a python function which will assign next displayable in list to currently displayed one. And a simple timer to change scenes/songs (and if there is a callback when track finishes playin, it is even easier)
As for animations, you can either use movie sprites, meaning that you will have to turn your gif into videofile or disassemble it to several frames and build animation inside RenPy using ATL.
okay, so would I set a single image as a button, and then when it was clicked it would change or would the button be above the image as a seperate thing?
I'm pretty new to this software so sorry about that, I'm just still confused as to how to code this
- Ocelot
- Lemma-Class Veteran
- Posts: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: interactive images
A quick example:
Make sure that there are images called "red", "green" and "blue" in "images" folder and later in your code you can do and you will see button you can click to change color of the button.
Code: Select all
init python:
buttons = ["images/red.png", "images/green.png", "images/blue.png"]
button = buttons[0]
def change_button():
global button
global buttons
buttons = buttons[1:] + buttons[:1]
button = buttons[0]
screen bb:
imagebutton idle "[button]" action Function(change_button) xalign 0.5 yalign 0.5
Code: Select all
show screen bb
< < insert Rick Cook quote here > >
- Izzayuh
- Newbie
- Posts: 15
- Joined: Sat Mar 19, 2016 12:06 am
- Projects: Masked, Lovetale
- Tumblr: izzycle
- Deviantart: izzysdoodles
- Contact:
Re: interactive images
Ocelot wrote:A quick example:Make sure that there are images called "red", "green" and "blue" in "images" folder and later in your code you can doCode: Select all
init python: buttons = ["images/red.png", "images/green.png", "images/blue.png"] button = buttons[0] def change_button(): global button global buttons buttons = buttons[1:] + buttons[:1] button = buttons[0] screen bb: imagebutton idle "[button]" action Function(change_button) xalign 0.5 yalign 0.5
and you will see button you can click to change color of the button.Code: Select all
show screen bb
thank you so so much for the help, this has cleared things up a lot for me. for
"screen bb:
imagebutton idle "[button]" action Function(change_button) xalign 0.5 yalign 0.5[/code]"
the xalign and yalign are what decides the position of the images in this code, correct?
- Ocelot
- Lemma-Class Veteran
- Posts: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: interactive images
Yes it does set position of image. You really want to read documentation: https://www.renpy.org/doc/html/
< < insert Rick Cook quote here > >
Who is online
Users browsing this forum: No registered users