Need help with character avatar choices
Posted: Fri Dec 13, 2019 2:25 pm
so, i dont know how to easily explain this so a quick ramble incoming:
i want to let the player choose their appearance between two preset choices, and i want to have that in a side image like this:
(ignore the assets, theyre all a placeholders)
https://i.gyazo.com/063aef43d894fb89c8c ... cb7756.jpg
i want to be able to change the expressions, and theres only going to be two preset choices. i have no idea where to even start with this, i have the character selection layout all done, but the part that's tripping me up is how to make the choice between the masc player character and the fem one stick, and be able to change between expressions as i normally would with a side image. i tried to look up others doing something similar to this, that had made tutorials or posted the code that i could learn from, but i wasnt able to find anything. i feel like itll be a really simple fix but im still fairly new to renpy
also with the images, i havent even tried to add the second choice placeholders because i wasnt sure where to start with this so i havent put them together yet. i also wasn't 100% if the code was needed or not, because all of this works but i need to know where to go going forward from here.
in script.rpy:
# Character points
$ mascPoints = 0
$ femPoints = 0
screen charselscreen:
zorder 100
imagemap:
ground "ground"
idle "idle"
hover "hover"
hotspot (1122, 168, 572, 911) action SetVariable("mascPoints", mascPoints + 1), Return()
hotspot (501, 164, 568, 912) action SetVariable("femPoints", femPoints + 1), Return()
label chrsel:
show bg street with dissolve
"Who are you?"
$ renpy.call_screen("charselscreen")
if mascPoints ==1:
"I see! What's your name?"
$ yn = renpy.input("I see! What's your name?")
$ yn = yn.title()
$ yn = yn.strip()
if yn == "":
$ yn = "Penn"
if femPoints ==1:
"I see! What's your name?"
$ yn = renpy.input("I see! What's your name?")
$ yn = yn.title()
$ yn = yn.strip()
if yn == "":
$ yn = "Penny"
in a custom images.rpy:
image side yn smiling:
"/images/yn smiling.png"
size(484,667)
image side yn fearful:
"images/yn fearful.png"
size(484,667)
image side yn uncomfortable:
"images/yn uncomfortable.png"
size(484,667)
i want to let the player choose their appearance between two preset choices, and i want to have that in a side image like this:
(ignore the assets, theyre all a placeholders)
https://i.gyazo.com/063aef43d894fb89c8c ... cb7756.jpg
i want to be able to change the expressions, and theres only going to be two preset choices. i have no idea where to even start with this, i have the character selection layout all done, but the part that's tripping me up is how to make the choice between the masc player character and the fem one stick, and be able to change between expressions as i normally would with a side image. i tried to look up others doing something similar to this, that had made tutorials or posted the code that i could learn from, but i wasnt able to find anything. i feel like itll be a really simple fix but im still fairly new to renpy
also with the images, i havent even tried to add the second choice placeholders because i wasnt sure where to start with this so i havent put them together yet. i also wasn't 100% if the code was needed or not, because all of this works but i need to know where to go going forward from here.
in script.rpy:
# Character points
$ mascPoints = 0
$ femPoints = 0
screen charselscreen:
zorder 100
imagemap:
ground "ground"
idle "idle"
hover "hover"
hotspot (1122, 168, 572, 911) action SetVariable("mascPoints", mascPoints + 1), Return()
hotspot (501, 164, 568, 912) action SetVariable("femPoints", femPoints + 1), Return()
label chrsel:
show bg street with dissolve
"Who are you?"
$ renpy.call_screen("charselscreen")
if mascPoints ==1:
"I see! What's your name?"
$ yn = renpy.input("I see! What's your name?")
$ yn = yn.title()
$ yn = yn.strip()
if yn == "":
$ yn = "Penn"
if femPoints ==1:
"I see! What's your name?"
$ yn = renpy.input("I see! What's your name?")
$ yn = yn.title()
$ yn = yn.strip()
if yn == "":
$ yn = "Penny"
in a custom images.rpy:
image side yn smiling:
"/images/yn smiling.png"
size(484,667)
image side yn fearful:
"images/yn fearful.png"
size(484,667)
image side yn uncomfortable:
"images/yn uncomfortable.png"
size(484,667)