Page 1 of 1
How to make an in game character creator?
Posted: Mon Jun 13, 2022 7:08 pm
by prince_lvcio
like letting the player make their character like a picrew or somethin
or, if that's too complicated, how to just put up a menu of characters and let the player choose between them?
Re: How to make an in game character creator?
Posted: Mon Jun 13, 2022 9:58 pm
by _ticlock_
prince_lvcio wrote: ↑Mon Jun 13, 2022 7:08 pm
like letting the player make their character like a picrew or somethin
I have seen a lot of examples. Consider looking in
Creative Commons,
Ren'Py Cookbook, and other sections.
Here are some resources:
https://lunalucid.itch.io/free-characte ... -for-renpy
viewtopic.php?f=46&t=21515&hilit=IIcharacter#p273683
prince_lvcio wrote: ↑Mon Jun 13, 2022 7:08 pm
or, if that's too complicated, how to just put up a menu of characters and let the player choose between them?
Here is a simplified example with screen language (you can also find some other examples of screens with buttons in
Ren'Py Cookbook or
Ren'Py Questions and Announcements):
Code: Select all
screen select_character():
default selected_character = None
hbox:
spacing 10
frame:
background ("#aaffff" if selected_character == "boy_00.png" else "#ffffff")
imagebutton:
idle "boy_00.png"
action SetScreenVariable('selected_character', "boy_00.png")
frame:
background ("#aaffff" if selected_character == "boy_01.png" else "#ffffff")
imagebutton:
idle "boy_01.png"
action SetScreenVariable('selected_character', "boy_01.png")
frame:
background ("#aaffff" if selected_character == "boy_02.png" else "#ffffff")
imagebutton:
idle "boy_02.png"
action SetScreenVariable('selected_character', "boy_02.png")
if selected_character != None:
textbutton _("Select"):
xalign 1.0 yalign 1.0
action Return(selected_character)
default mc_image_name = 'boy_00.png'
image mc_image = "[mc_image_name]"
label start:
call screen select_character
$ mc_image_name = _return
show mc_image at left
"Character is selected!"