Ren'Py I want to do hovering in mainmenu help

Tinkel Studios

Member
Game Developer
May 13, 2018
247
201
I want to do hovering in my mainmenu in ren'py but when i move my cursor to the left character i just want her to change not middle or right when i move my cursor right girl right girl must change how can i do that help pls!
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,557
2,170
Your question isn't very clear.

It sounds like you want to change the image for each girl when you move the mouse over them.
So moving the mouse over girl#1 will change girl#1 image, but the other two won't be altered.

Are the girls clickable? That is... if you click on a girl, does your game perform some sort of action?

Making some assumptions... but I think you're going to need to split up your 2 original images into 7 images (almost of 4 images per original picture), as follows:
  • 1x background image. (let's assume your current main_menu.png)
  • 2x images for girl#1, cut out from the original background image to create a picture of the girl on a transparent background.
  • 2x images for girl#2, yada, yada.
  • 2x images for girl#3, same again.

You'll probably need to redo the naked images, since the girls are NOT stood in the same spots (they move compared with wall+trees behind them. Although you could re-render the scene without the girls at all and use that as your background (beware their shadows on the floor).

Then you build a RenPy which uses the 2 images per girl as idle and hover images for an ... overlaid onto the original background image.

The idle images will be identical to the positioning/size of the background image girl. And when you overlay the idle image over the background you shouldn't even notice that they are there. They're used purely so RenPy knows what parts of the screen are the girl (the girl image) and which parts aren't (the transparent background). The non-transparent parts of image become the clickable button.

The hover images are there to act as the alternate image... which will replace the idle image when the player moves the mouse over them. The idle and hover images do NOT need identically sized. Though it is usually a good idea to make the hover image either the same size or slightly bigger.

I've had examples (though not always girls) in threads like:
https://f95zone.to/threads/finding-...point-click-game-on-renpy.25325/#post-1565577
https://f95zone.to/threads/how-to-make-an-imagemap.147846/#post-10064909
https://f95zone.to/threads/help-with-imagemaps.50306/
an over the top example: https://f95zone.to/threads/intelligent-imagebuttons.63595/post-4333668

Each of those 3 of those 4 examples include code for the screen, imagebutton and what the various images parts should look like. I think all 3 contain example RenPy games downloadable to try each.

If the girls aren't clickable... and you just want to swap the images when you mouse-over them.... use action Null() as part of their imagebutton/screen definition.
 
Last edited:
  • Like
Reactions: anne O'nymous

Tinkel Studios

Member
Game Developer
May 13, 2018
247
201
Your question isn't very clear.

It sounds like you want to change the image for each girl when you move the mouse over them.
So moving the mouse over girl#1 will change girl#1 image, but the other two won't be altered.

Are the girls clickable? That is... if you click on a girl, does your game perform some sort of action?

Making some assumptions... but I think you're going to need to split up your 2 original images into 7 images (almost of 4 images per original picture), as follows:
  • 1x background image. (let's assume your current main_menu.png)
  • 2x images for girl#1, cut out from the original background image to create a picture of the girl on a transparent background.
  • 2x images for girl#2, yada, yada.
  • 2x images for girl#3, same again.

You'll probably need to redo the naked images, since the girls are NOT stood in the same spots (they move compared with wall+trees behind them. Although you could render then scene without the girls at all and use that as your background (beware their shadows on the floor).

Then you build a RenPy which uses the 2 images per girl as idle and hover images for an ... overlaid onto the original background image.

The idle images will be identical to the positioning/size of the background image girl. And when you overlay the idle image over the background you shouldn't even notice that they are there. They're used purely so RenPy knows what parts of the screen are the girl (the girl image) and which parts aren't (the transparent background). The non-transparent parts of image become the clickable button.

The hover images are there to act as the alternate image... which will replace the idle image when the player moves the mouse over them. The idle and hover images do NOT need identically sized. Though it is usually a good idea to make the hover image either the same size or slightly bigger.

I've had examples (though not always girls) in threads like:
https://f95zone.to/threads/finding-...point-click-game-on-renpy.25325/#post-1565577
https://f95zone.to/threads/how-to-make-an-imagemap.147846/#post-10064909
https://f95zone.to/threads/help-with-imagemaps.50306/
an over the top example: https://f95zone.to/threads/intelligent-imagebuttons.63595/post-4333668

Each of those 3 of those 4 examples include code for the screen, imagebutton and what the various images parts should look like. I think all 3 contain example RenPy games downloadable to try each.

If the girls aren't clickable... and you just want to swap the images when you mouse-over them.... use action Null() as part of their imagebutton/screen definition.
Do you have discord mate? i want to ask so many questions if you're okay
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,557
2,170
Do you have discord mate? i want to ask so many questions if you're okay

It's better to ask questions here on the forums.
Not least, because if I can't answer a question... someone else here can.
The time I spend here on F95 isn't predictable enough to be reliable source of information to someone working on a project.
 

Tinkel Studios

Member
Game Developer
May 13, 2018
247
201
It's better to ask questions here on the forums.
Not least, because if I can't answer a question... someone else here can.
The time I spend here on F95 isn't predictable enough to be reliable source of information to someone working on a project.
How i fix that gray square thing? When i use scene command with a video this square thing is appears video is working well but when i click to pass scene fastly this square is appears help me pls
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,557
2,170
How i fix that gray square thing? When i use scene command with a video this square thing is appears video is working well but when i click to pass scene fastly this square is appears help me pls
Could you post your code for the section of your script that is covered this video?

It includes the lines:

"This is not what i inside mean by the way!"​
"I did!"​
"(Unbutton)"​
"Welcome then, let me show you inside."​

You might be using renpy.movie_cutscene("vidname.mp4") or image vidname1 = Movie(play="vidname.mp4") / show vidname1.
The actual code is what matters here and it's difficult to fix if we don't know how you have written it.

To explain things, the gray checkerboard is shown where no background image is available, but it is only shown in developer mode. A "normal" player will see a black background and the video will be shown over it.
See : https://f95zone.to/threads/where-to-put-video-when-using-cutscene.164427/
 
  • Like
Reactions: Tinkel Studios

DiviDreamer

Member
Aug 29, 2020
249
215
Ermm.. "We all float down here" =)
Anyway the simplest way is to use AE - just cut aout one of the girl and
save it as PNG+RGBA (Alpha channel), at button use
focus_mask True
 
  • Like
Reactions: Tinkel Studios

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,124
14,803
To explain things, the gray checkerboard is shown where no background image is available, but it is only shown in developer mode. A "normal" player will see a black background and the video will be shown over it.
See : https://f95zone.to/threads/where-to-put-video-when-using-cutscene.164427/
Yeah, sound like a loading time issue. Ren'Py being speed up, it don't have the time to load the video in cache, and therefore show this "nothing to see here" intermediary.
 
  • Like
Reactions: Tinkel Studios

Tinkel Studios

Member
Game Developer
May 13, 2018
247
201
Could you post your code for the section of your script that is covered this video?

It includes the lines:

"This is not what i inside mean by the way!"​
"I did!"​
"(Unbutton)"​
"Welcome then, let me show you inside."​

You might be using renpy.movie_cutscene("vidname.mp4") or image vidname1 = Movie(play="vidname.mp4") / show vidname1.
The actual code is what matters here and it's difficult to fix if we don't know how you have written it.

To explain things, the gray checkerboard is shown where no background image is available, but it is only shown in developer mode. A "normal" player will see a black background and the video will be shown over it.
See : https://f95zone.to/threads/where-to-put-video-when-using-cutscene.164427/
TYSM <3

here is my lines btw
pictures are not the problem that's why i didn't add the image bg intro b, c ,e etc


image BG intro d = Movie(play="images/introd.webm")



e "Welcome then, let me show you inside."
scene BG intro b with dissolve
e "I feel kinda shy about this..."
scene BG intro c with dissolve
"(Unbutton)"
e "I did!"
scene BG intro d with dissolve
e "This is not what i inside mean by the way!"
scene BG intro e with dissolve