(SOLVED!) Wondering how to make a simple discussion mechanic.
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.
- PrxnceKxsses
- Newbie
- Posts: 13
- Joined: Mon Nov 19, 2018 5:04 pm
- Completed: None yet!
- Projects: Painkiller
- Contact:
(SOLVED!) Wondering how to make a simple discussion mechanic.
Hi all, I'm kinda learning as I go with Renpy and in my game, I would really like to have a discussion mechanic sort of like the one in Your Turn To Die.https://www.youtube.com/watch?v=2b7QN3B26Tg&t=1030s
I would want to be able to click on a characters face and choose them to say something like in the example I included.
I figure I can pull something like this off with an imagemap or imagebutton. I can probably figure out how to implement this on my own, but this is a feature I'd like to use a lot throughout the game for different discussions the characters have. The only way I can think to make this work is to make a new screen every time I want the character you click on to say something different if that makes sense at all. (Like, when the player has clicked on all the right people and has spoken to them, there is a jump to the next part of the discussion and clicking on the same characters face will have them say something new.)
I'm wondering if there's a simpler way of doing this. I'm learning as I go with renpy and would love a push in the right direction.
Thank you!
I would want to be able to click on a characters face and choose them to say something like in the example I included.
I figure I can pull something like this off with an imagemap or imagebutton. I can probably figure out how to implement this on my own, but this is a feature I'd like to use a lot throughout the game for different discussions the characters have. The only way I can think to make this work is to make a new screen every time I want the character you click on to say something different if that makes sense at all. (Like, when the player has clicked on all the right people and has spoken to them, there is a jump to the next part of the discussion and clicking on the same characters face will have them say something new.)
I'm wondering if there's a simpler way of doing this. I'm learning as I go with renpy and would love a push in the right direction.
Thank you!
Last edited by PrxnceKxsses on Wed Dec 20, 2023 1:12 am, edited 1 time in total.
New to coding, learning as I go
- m_from_space
- Miko-Class Veteran
- Posts: 975
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Wondering how to make a simple discussion mechanic.
As far as the video is concerned it doesn't look like much more than jumping to a specific label after clicking on one of those avatars. And then you include dialogue into the label. So what's the big deal exactly?
- PrxnceKxsses
- Newbie
- Posts: 13
- Joined: Mon Nov 19, 2018 5:04 pm
- Completed: None yet!
- Projects: Painkiller
- Contact:
Re: Wondering how to make a simple discussion mechanic.
I mention in my post that I am asking if I'll have to make a new screen every time I want the avatar to jump to a different label, or if there's a simpler way of doing so that I don't know about.m_from_space wrote: ↑Tue Oct 17, 2023 2:54 am As far as the video is concerned it doesn't look like much more than jumping to a specific label after clicking on one of those avatars. And then you include dialogue into the label. So what's the big deal exactly?
New to coding, learning as I go
Re: Wondering how to make a simple discussion mechanic.
Depending on how you try to make it, I think, renpy.jump(yourlabel) would be useful.
In your screen somewhere:
Code: Select all
default yourlabel = "topic"
Code: Select all
renpy.jump(yourlabel)
Code: Select all
label topic:
"bla bla bla"
- PrxnceKxsses
- Newbie
- Posts: 13
- Joined: Mon Nov 19, 2018 5:04 pm
- Completed: None yet!
- Projects: Painkiller
- Contact:
Re: Wondering how to make a simple discussion mechanic.
henne wrote: ↑Wed Oct 18, 2023 3:45 am Depending on how you try to make it, I think, renpy.jump(yourlabel) would be useful.
In your screen somewhere:Code: Select all
default yourlabel = "topic"
Code: Select all
renpy.jump(yourlabel)
Code: Select all
label topic: "bla bla bla"
I plan on making a very simple imagemap with a couple of clickable icons for different characters. My game is inspired by the Danganronpa killing game format, so there's going to be characters that die and when a character dies, everyone else has a discussion to figure out the killer.
Sorry if this is a stupid question, but would the way you're suggesting make it so that I don't have to make a new screen every time I have the discussion progress?
Such as
Code: Select all
label topic1:
e "This is the first discussion"
label topic2:
e "This is the second discussion"
New to coding, learning as I go
- PrxnceKxsses
- Newbie
- Posts: 13
- Joined: Mon Nov 19, 2018 5:04 pm
- Completed: None yet!
- Projects: Painkiller
- Contact:
Re: Wondering how to make a simple discussion mechanic.
Lol, as an update, I thought about this for a long while and it FINALLY clicked with me what it meant! This was so extremely helpful once I realized what you were trying to say, and now I have it completely working. For anyone in the future who needs help with a feature like this, this is what I've done:henne wrote: ↑Wed Oct 18, 2023 3:45 am Depending on how you try to make it, I think, renpy.jump(yourlabel) would be useful.
In your screen somewhere:Code: Select all
default yourlabel = "topic"
Code: Select all
renpy.jump(yourlabel)
Code: Select all
label topic: "bla bla bla"
Code: Select all
## Before game starts
default kottopic = "meetkotone"
## This part is for if I even want this character to say anything during the discussion... If I want the icon greyed out I just set kottalk to False, if I want him to be able to say something I set it to True, you get it
default kottalk = True
## The screen itself
screen discussion:
imagebutton:
xpos 259
ypos 112
if kottalk == False:
idle "kot_grey"
hover "kot_grey"
else:
idle "kot_idle"
hover "kot_hover"
if kottalk == False:
action NullAction()
else:
action Jump(kottopic)
## During the game
label meetkotone:
hide screen discussion
k "Like I said, I'm Kotone Suda. He/him, they is also cool if I like ya."
Code: Select all
$ kottopic = "newtopic"
And for those curious here's what the screen looks like. The imagebutton in this example is the icon on the top far left!
I hope this is helpful for anyone in the future looking to make a Danganronpa/YTTD style game!
New to coding, learning as I go
Re: Wondering how to make a simple discussion mechanic.
Glad it helped, sorry if it was too confusing at first.PrxnceKxsses wrote: ↑Wed Dec 20, 2023 1:11 am Lol, as an update, I thought about this for a long while and it FINALLY clicked with me what it meant! This was so extremely helpful once I realized what you were trying to say, and now I have it completely working. For anyone in the future who needs help with a feature like this, this is what I've done:
Who is online
Users browsing this forum: Semrush [Bot]