RenPy Tutorial using imagebutton | Point and Click Feature

RenPy Tutorial using imagebutton | Point and Click Feature

Zeil Learnings

3 года назад

66,204 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@martinhernanz8014
@martinhernanz8014 - 23.10.2023 02:15

this its a good tutorial.

Ответить
@catoblepag
@catoblepag - 29.09.2023 22:04

I have a super noob question about imagebuttons: it's simple, but I couldn't find a solution 'cause most tutorials don't show my particular example. Hope you can help me, thank you very, very much in advance!

I've made an imagebutton for a painting on the wall of a background: when you click on it, it displays a zoomed image of the painting and a comment by the main character. I've used "show screen" instead of "call", 'cause I wanted the dialogue to continue if you click anywhere else. So far, so good: everything works, except for the fact that when you're done looking at the painting and you click, the game kicks you back to the title screen. I've looked everywhere and for the life of me I can't find the right script line to resume the gameplay!

This is my code:

screen living_room():

imagebutton auto "bg scene_3_painting_%s":
focus_mask True
hovered [ Play("sound", "audio/click.mp3") ]
action Jump ("look_at_painting")


label look_at_painting:
show image "painting_see.png"
with dissolve
alice "It's a nice painting."
hide image "painting_see.png"

Ответить
@rodionzaspanov5889
@rodionzaspanov5889 - 25.09.2023 12:53

Thank you very much! Very useful.

Ответить
@marektomas9256
@marektomas9256 - 12.08.2023 20:50

Hello. Maybe you can help. I am trying to go accordingly, but... I tried it and it didn´t work. I think the issue is that I don´t know what is "screen" vs "scene" and "jump" vs "Jump" vs "call". Why is at the end Jump("end") and what is does. "end" is just text?? What is zeil_learnings_logo? It is image? :O Because I understand the concept..but it doesn´t work because I don´t know what are the things use in it. Thank you

Ответить
@dragonanimations0748
@dragonanimations0748 - 28.06.2023 23:16

Love your tutorials! One question: I got the code to work however, when ever my mouse hovers over the image the "hovered image" doesn't show. Do you have any possible fixes for that?

Ответить
@steamycarafe
@steamycarafe - 28.04.2023 01:12

Thank you so much! Your tutorial is very clear and concise. Much appreciated!

Ответить
@facara4519
@facara4519 - 18.04.2023 10:56

can I do a call to a seperated script? So if I have a menue for example a a picture of a town and you walk to the town houses by klicking on them. I can call that menue for anywhere in the game? By simply calling for the script?

Ответить
@OdinX27
@OdinX27 - 09.03.2023 02:11

you are really amazing thank you :) <3

Ответить
@jadeenault2619
@jadeenault2619 - 07.03.2023 12:46

thank you so much! i'm trying to make a game even tho i have no coding experience in any engine or language lol. this makes it way easier :)

Ответить
@tintenklexs7112
@tintenklexs7112 - 09.02.2023 20:36

Thanks! Just starting out and this is a great help!

Ответить
@swedishgamedev1028
@swedishgamedev1028 - 08.02.2023 19:40

As always, extremely useful information on Ren’Py. Thank you 🙏 What is your point-and-click-game called? Where do we find it? Keep doing good stuff!

Ответить
@VOCAR0SE
@VOCAR0SE - 03.02.2023 21:17

Hey! Something that keeps happening is that the hover is working, it's just it activates even when my mouse is very far from the image button, any help?

Ответить
@solbadly4512
@solbadly4512 - 20.01.2023 09:09

If we wanted to have a different image when hovered, and also when clicked... how could we do it? Thank you for these ttutorials!

Ответить
@papapaul7269
@papapaul7269 - 18.12.2022 16:54

Wonderful tutorial but how can I create multiple image buttons?? I'm really struggling with that

Ответить
@cyber_ari3265
@cyber_ari3265 - 06.12.2022 10:44

Hi! This tutorial was really helpful! However, I was wondering if you (or anyone) could show me how to add a timer to it? I want to make it so that you have to click the object in a certain amount of time, or else the outcome will be different. How do I do this?

I've looked at various forums, but those all contain the phrase 'screen countdown' when calling the countdown, which renpy won't allow. I'm guessing it's because we've already got 'screen' written for the imagebutton. idk, I only recently started using renpy, plz help!

Ответить
@gasaiyuno777
@gasaiyuno777 - 27.11.2022 08:07

thank you! but is there a way for the action to change the background?

Ответить
@ONCEUU
@ONCEUU - 04.11.2022 09:15

curious po ako kung anong resolution nung mga clickable image ate zeil

Ответить
@grayphase1109
@grayphase1109 - 23.09.2022 00:00

probably outdated

Ответить
@marklakan774
@marklakan774 - 07.09.2022 01:37

thank you so much for these tutorials! They're so well made and such a big help

Ответить
@wetheau1104
@wetheau1104 - 01.08.2022 19:41

I can't seem to make this work, any chance you can help me on discord?

Ответить
@rozshuu2383
@rozshuu2383 - 30.07.2022 19:17

Yes but these are main menu buttons. How would you replace the option buttons at the bottom during gameplay to images?(load, preferences, skip, etc. ,,, the buttons under the gui dialogue box)

Would you do the same?

Ответить
@EriksBlue
@EriksBlue - 30.05.2022 23:09

I am getting this error from the tutorial. Did you do something on the backend that you didnt include in your video? Can you help I dont know how to resolve this



While running game code:
File "game/script.rpy", line 15, in script
call screen zeil_learnings_logo
File "renpy/common/000statements.rpy", line 569, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "renpy/common/00action_control.rpy", line 126, in _call_
renpy.show_screen(self.screen, *self.args, **self.kwargs)
Exception: Screen displayTextScreen is not known.

Ответить
@santibang8764
@santibang8764 - 18.05.2022 17:32

I'm trying to add music to the action, but I'm having some troubles with it. The code is:

72screen musicboxplay:
73 imagebutton:
74 xanchor 0.5
75 yanchor 0.5
76 xpos 0.5
77 ypos 0.28
78 idle "mb_idle.png"
79 hover "mb_hovered.png"
80 action [play music mb_music loop, Jump("end")]

It says:

After initialization, but before game start.
File "game/script.rpy", line 72, in prepare_screen
screen musicboxplay:
File "game/script.rpy", line 72, in prepare
screen musicboxplay:
File "game/script.rpy", line 73, in prepare
imagebutton:
File "game/script.rpy", line 73, in prepare
imagebutton:
SyntaxError: invalid syntax (game/script.rpy, line 80)

Do you know what can be wrong? Thanks!

Ответить
@Dragon_Fox
@Dragon_Fox - 15.05.2022 08:58

I am having problems with my button... Ren'py is not recognising "idle" or "auto" and my button isn't working
Is there someway else I could make a button? :(

Ответить
@TheKillingMxxn
@TheKillingMxxn - 11.05.2022 07:06

Would you ever make a tutorial for someone who wants to make a point and click game where if you click on certain buttons it takes you to different rooms? I think I want my game to work like that, such as the player clicks the button to enter a room, the characters react to the player entering the room, and then the player is able to move to a different room and progress through the game that way. I'm having a hard time wrapping my head around how to make it so that the game doesn't repeat the same scenes upon entering the same rooms and how to have different things happen in the same rooms as the game progresses. I hope this made sense, I'm not exactly sure how to word all of this lol.

Ответить
@greenhousestudios7703
@greenhousestudios7703 - 10.05.2022 05:28

please help me i followed your video it has been five days it will not work

it says "atl statements contains two expressions in a row" please help

Ответить
@magpie_monster
@magpie_monster - 08.05.2022 14:56

you truly make such good and clear tutorials. absolutely wonderful.

Ответить
@alishacorke4152
@alishacorke4152 - 22.04.2022 17:00

For some reason, I got an exception for Screen displayTextScreen.

Ответить
@truexvalentine
@truexvalentine - 14.04.2022 19:17

Hello! :) Your videos are so organized and concise. I really appreciate them! I was wondering if anyone here knows how to make it so that the hover doesn't work on transparent parts of images? I've tried using focus_mask True in my imagebutton code, and it technically works, but there is a noticeable delay before it switches to the hovered version of the image! If I hover my mouse very fast across it, or hover my mouse back and forth very quickly on top of the image, it also will not change to the hovered version.

I've tried resizing the images (pngs) to about 500x600 pixels, but to no avail. I'm assuming it has something to do with having to re-run some section of code multiple times per second that's causing the delay in registering the mouse-hover, but am not 100% sure if that's the case, or what could be causing that, since I don't have much code in the file (it's less than 50 lines long!). I've put my focus_mask True just above the auto code (for the hover and idle) if that helps!

I'd really appreciate any help!!! <3

Ответить
@streetpunkstreams4730
@streetpunkstreams4730 - 01.04.2022 23:45

When you replace the images with auto, im not sure how it still knows which images to put there because theyre no longer a part of the code. Could you please clarify this?

Ответить
@rulessurvival5259
@rulessurvival5259 - 25.03.2022 19:14

how to put a transition to an imagebutton?

Ответить
@artemkrylov3287
@artemkrylov3287 - 03.03.2022 10:45

Thank you very very much, you very much to help me , save you God

Ответить
@Tom-fw2ls
@Tom-fw2ls - 21.02.2022 08:26

When i reach the screen all my game buttons vanish and I cant do anything :/

Ответить
@kyoumachi5077
@kyoumachi5077 - 09.02.2022 11:18

Thank you so much for your videos!

Ответить
@GRAY-vg8fl
@GRAY-vg8fl - 06.02.2022 03:30

is there a way to make a button do one thing, and when I click it again do another thing? I can make it work, but I'd prefer to have a one liner if there's one. Like:
action [Thing(), Thing2()]

Ответить
@yanjunguo5788
@yanjunguo5788 - 18.12.2021 10:59

sorry but why the game tell me "Exception:Screen displayTextScreen is not known",did i miss some part for Tutorial?

Ответить
@skulldays1891
@skulldays1891 - 03.11.2021 07:48

It wasn't working for me, the text didn't show up, until I realized that I didn't give the button an action, once I did it worked perfectly. I wonder if I could get the same without an action.
Edit: action Hide("displayTextScreen")
I need to sleep, it was easier than I thought at first, leaving that as the only action.

Ответить
@mirus6190
@mirus6190 - 23.10.2021 22:13

omg.. i've been trying to search how to accomplish this!!! You're my angel.. i mean my answer~ Thank you for making this video and it's straight to the point.

Ответить
@kekirc4585
@kekirc4585 - 24.09.2021 18:18

How do fix the ingame preferences and save button ?

Ответить
@lilavenpalette
@lilavenpalette - 13.09.2021 08:00

this is exactly the kind of video i needed!!! also super cool that you're from the Philippines as well, i was surprised to hear a Filipino accent voicing this! thanks so much for your vids!!!

Ответить
@SaulD-xd6mj
@SaulD-xd6mj - 28.08.2021 08:52

How could it be done so that when an imagebutton is clicked, it is saved in a variable to be used to achieve a final?

Ответить
@hachiman2639
@hachiman2639 - 23.07.2021 14:52

thank you, this is a big help!!

Ответить
@sadfaffsafd6153
@sadfaffsafd6153 - 20.07.2021 01:28

love how clear and concise your tutorials are!! its a big help

Ответить
@Lextrack12
@Lextrack12 - 16.07.2021 21:26

Thanks for your work, please don't stop doing this.

Ответить
@lupidoo3410
@lupidoo3410 - 07.07.2021 00:46

Thanks for this, really. All the tutorials I can find are from 2015-2016 and are super outdated. This was really useful.

Ответить
@rukissketchbook9803
@rukissketchbook9803 - 22.06.2021 18:56

Thank you so much for the tutorial! But I wrote down the code just like you did but with two buttons but it automatically goes to the next page without me clicking any buttons 😭 I've tried everything, but nothing works!

Ответить
@reaperbunny7794
@reaperbunny7794 - 19.06.2021 09:19

I’m having issues with this. I don’t see the images I made for the point and click popping up and I also don’t have my image button

Ответить
@PeterTown
@PeterTown - 16.06.2021 14:43

So good - exactly what I needed for my visual novels! I made two buttons which when clicked go down different paths (I wanted more than just the default choice text buttons)

Ответить
@hawa777channel
@hawa777channel - 15.06.2021 04:26

Took me 3 hours to understand
Thank you!
Can I write the button code in separate file?

Ответить
@3ll1x3r
@3ll1x3r - 01.06.2021 16:50

Thank you so much for your videos! They’re so helpful. I wondered how you would have multiple image buttons to clicks, kind of like making a map/point and click kind of game c:

Ответить