Hey there. I was recycling and editing some old MC customization code for a new game I'm working on and everything works apart from the fact that the side image avatar won't pop up whenever the MC speaks. I can't think of anything that would cause this, but it's possible I deleted some important little snippet of code while changing stuff up
On a similar note; the ctc icon also won't show up for the MC when they speak, but works just fine for Eileen. Any tips?
The custom screen:
Code: Select all
default skin = 1
default hairstyle = 1
default haircolor = 1
default eyecolor = 1
default eyeshape = 1
default brows = 1
default mouth = 1
default nose = 1
default outfit = 1
default accessory = 1
default skin_detail = 1
layeredimage mc:
###################skin color################
if skin == 1:
"/images/dressup/skin/skin_1.png"
elif skin == 2:
"/images/dressup/skin/skin_2.png"
elif skin == 3:
"/images/dressup/skin/skin_3.png"
elif skin == 4:
"/images/dressup/skin/skin_4.png"
elif skin == 5:
"/images/dressup/skin/skin_5.png"
elif skin == 6:
"/images/dressup/skin/skin_6.png"
############skin details############
if skin_detail == 1:
"/images/dressup/skin/skin_details_1.png"
elif skin_detail == 2:
"/images/dressup/skin/skin_details_2.png"
elif skin_detail == 3:
"/images/dressup/skin/skin_details_3.png"
elif skin_detail == 4:
"/images/dressup/skin/skin_details_4.png"
elif skin_detail == 5:
"/images/dressup/skin/skin_details_5.png"
elif skin_detail == 6:
"/images/dressup/skin/skin_details_6.png"
elif skin_detail == 7:
"/images/dressup/skin/skin_details_7.png"
elif skin_detail == 8:
"/images/dressup/skin/skin_details_8.png"
elif skin_detail == 9:
"/images/dressup/skin/skin_details_9.png"
############################eye shape#########################
if eyeshape == 1 and skin == 1:
"/images/dressup/eye shape/eyes_1_1.png"
elif eyeshape == 1 and skin == 2:
"/images/dressup/eye shape/eyes_1_2.png"
elif eyeshape == 1 and skin == 3:
"/images/dressup/eye shape/eyes_1_3.png"
elif eyeshape == 1 and skin == 4:
"/images/dressup/eye shape/eyes_1_4.png"
elif eyeshape == 1 and skin == 5:
"/images/dressup/eye shape/eyes_1_5.png"
elif eyeshape == 1 and skin == 6:
"/images/dressup/eye shape/eyes_1_6.png"
if eyeshape == 2 and skin == 1:
"/images/dressup/eye shape/eyes_2_1.png"
elif eyeshape == 2 and skin == 2:
"/images/dressup/eye shape/eyes_2_2.png"
elif eyeshape == 2 and skin == 3:
"/images/dressup/eye shape/eyes_2_3.png"
elif eyeshape == 2 and skin == 4:
"/images/dressup/eye shape/eyes_2_4.png"
elif eyeshape == 2 and skin == 5:
"/images/dressup/eye shape/eyes_2_5.png"
elif eyeshape == 2 and skin == 6:
"/images/dressup/eye shape/eyes_2_6.png"
##################eye color##############
if eyecolor == 1:
"/images/dressup/eye color/iris_1.png"
elif eyecolor == 2:
"/images/dressup/eye color/iris_2.png"
elif eyecolor == 3:
"/images/dressup/eye color/iris_3.png"
elif eyecolor == 4:
"/images/dressup/eye color/iris_4.png"
############# mouth ###############
if mouth == 1 and skin == 1:
"/images/dressup/mouth/mouth_1_1.png"
elif mouth == 1 and skin == 2:
"/images/dressup/mouth/mouth_1_2.png"
elif mouth == 1 and skin == 3:
"/images/dressup/mouth/mouth_1_3.png"
elif mouth == 1 and skin == 4:
"/images/dressup/mouth/mouth_1_4.png"
elif mouth == 1 and skin == 5:
"/images/dressup/mouth/mouth_1_5.png"
elif mouth == 1 and skin == 6:
"/images/dressup/mouth/mouth_1_6.png"
#################eyebrows##############
if brows == 1:
"/images/dressup/eyebrows/brows_1.png"
elif brows == 2:
"/images/dressup/eyebrows/brows_2.png"
elif brows == 3:
"/images/dressup/eyebrows/brows_3.png"
elif brows == 4:
"/images/dressup/eyebrows/brows_4.png"
elif brows == 5:
"/images/dressup/eyebrows/brows_5.png"
elif brows == 6:
"/images/dressup/eyebrows/brows_6.png"
elif brows == 7:
"/images/dressup/eyebrows/brows_7.png"
####################outfit#########################
if outfit == 1:
"/images/dressup/outfit/outfit_1.png"
elif outfit == 2:
"/images/dressup/outfit/outfit_2.png"
elif outfit == 3:
"/images/dressup/outfit/outfit_3.png"
elif outfit == 4:
"/images/dressup/outfit/outfit_4.png"
elif outfit == 5:
"/images/dressup/outfit/outfit_5.png"
elif outfit == 6:
"/images/dressup/outfit/outfit_6.png"
elif outfit == 7:
"/images/dressup/outfit/outfit_7.png"
elif outfit == 8:
"/images/dressup/outfit/outfit_8.png"
elif outfit == 9:
"/images/dressup/outfit/outfit_9.png"
elif outfit == 10:
"/images/dressup/outfit/outfit_10.png"
elif outfit == 11:
"/images/dressup/outfit/outfit_11.png"
##################hair style############################
if hairstyle == 1:
"/images/dressup/hair/hair_1.png"
elif hairstyle == 2:
"/images/dressup/hair/hair_2.png"
elif hairstyle == 3:
"/images/dressup/hair/hair_3.png"
elif hairstyle == 4:
"/images/dressup/hair/hair_4.png"
elif hairstyle == 5:
"/images/dressup/hair/hair_5.png"
elif hairstyle == 6:
"/images/dressup/hair/hair_6.png"
elif hairstyle == 7:
"/images/dressup/hair/hair_7.png"
elif hairstyle == 8:
"/images/dressup/hair/hair_8.png"
elif hairstyle == 9:
"/images/dressup/hair/hair_9.png"
elif hairstyle == 10:
"/images/dressup/hair/hair_10.png"
###############hair color####################
if hairstyle == 1 and haircolor == 1:
"/images/dressup/hair/hair_1_1.png"
elif hairstyle == 1 and haircolor == 2:
"/images/dressup/hair/hair:1_2.png"
elif hairstyle == 1 and haircolor == 3:
"/images/dressup/hair/hair:1_3.png"
elif hairstyle == 1 and haircolor == 4:
"/images/dressup/hair/hair_1_4.png"
if hairstyle == 2 and haircolor == 1:
"/images/dressup/hair/hair_2_1.png"
elif hairstyle == 2 and haircolor == 2:
"/images/dressup/hair/hair_2_2.png"
elif hairstyle == 2 and haircolor == 3:
"/images/dressup/hair/hair_2_3.png"
elif hairstyle == 2 and haircolor == 4:
"/images/dressup/hair/hair_2_4.png"
if hairstyle == 3 and haircolor == 1:
"/images/dressup/hair/hair_3_1.png"
elif hairstyle == 3 and haircolor == 2:
"/images/dressup/hair/hair_3_2.png"
elif hairstyle == 3 and haircolor == 3:
"/images/dressup/hair/hair_3_3.png"
elif hairstyle == 3 and haircolor == 4:
"/images/dressup/hair/hair_3_4.png"
if hairstyle == 4 and haircolor == 1:
"/images/dressup/hair/hair_4_1.png"
elif hairstyle == 4 and haircolor == 2:
"/images/dressup/hair/hair_4_2.png"
elif hairstyle == 4 and haircolor == 3:
"/images/dressup/hair/hair_4_3.png"
elif hairstyle == 4 and haircolor == 4:
"/images/dressup/hair/hair_4_4.png"
if hairstyle == 5 and haircolor == 1:
"/images/dressup/hair/hair_5_1.png"
elif hairstyle == 5 and haircolor == 2:
"/images/dressup/hair/hair_5_2.png"
elif hairstyle == 5 and haircolor == 3:
"/images/dressup/hair/hair_5_3.png"
elif hairstyle == 5 and haircolor == 4:
"/images/dressup/hair/hair_5_4.png"
if hairstyle == 6 and haircolor == 1:
"/images/dressup/hair/hair_6_1.png"
elif hairstyle == 6 and haircolor == 2:
"/images/dressup/hair/hair_6_2.png"
elif hairstyle == 6 and haircolor == 3:
"/images/dressup/hair/hair_6_3.png"
elif hairstyle == 6 and haircolor == 4:
"/images/dressup/hair/hair_6_4.png"
if hairstyle == 7 and haircolor == 1:
"/images/dressup/hair/hair_7_1.png"
elif hairstyle == 7 and haircolor == 2:
"/images/dressup/hair/hair_7_2.png"
elif hairstyle == 7 and haircolor == 3:
"/images/dressup/hair/hair_7_3.png"
elif hairstyle == 7 and haircolor == 4:
"/images/dressup/hair/hair_7_4.png"
if hairstyle == 8 and haircolor == 1:
"/images/dressup/hair/hair_8_1.png"
elif hairstyle == 8 and haircolor == 2:
"/images/dressup/hair/hair_8_2.png"
elif hairstyle == 8 and haircolor == 3:
"/images/dressup/hair/hair_8_3.png"
elif hairstyle == 8 and haircolor == 4:
"/images/dressup/hair/hair_8_4.png"
if hairstyle == 9 and haircolor == 1:
"/images/dressup/hair/hair_9_1.png"
elif hairstyle == 9 and haircolor == 2:
"/images/dressup/hair/hair_9_2.png"
elif hairstyle == 9 and haircolor == 3:
"/images/dressup/hair/hair_9_3.png"
elif hairstyle == 9 and haircolor == 4:
"/images/dressup/hair/hair_9_4.png"
if hairstyle == 10 and haircolor == 1:
"/images/dressup/hair/hair_10_1.png"
elif hairstyle == 10 and haircolor == 2:
"/images/dressup/hair/hair_10_2.png"
elif hairstyle == 10 and haircolor == 3:
"/images/dressup/hair/hair_10_3.png"
elif hairstyle == 10 and haircolor == 4:
"/images/dressup/hair/hair_10_4.png"
############accessories################
if accessory == 1:
"/images/dressup/accessory/accessory_1.png"
elif accessory == 2:
"/images/dressup/accessory/accessory_2.png"
elif accessory == 3:
"/images/dressup/accessory/accessory_3.png"
elif accessory == 4:
"/images/dressup/accessory/accessory_4.png"
elif accessory == 5:
"/images/dressup/accessory/accessory_5.png"
screen dollmaker():
zorder 100
on 'show':
action SetVariable('quick_menu', False)
on 'hide':
action SetVariable('quick_menu', True)
add "/images/dressup/ground.png"
hbox:
yalign 1.0
xalign 0.9
spacing 50
add "mc"
vbox:
yalign 0.65
xalign 0.1
spacing 30
hbox:
spacing 30
imagemap: #skin color
hover "/images/dressup/buttons/skin_hover.png"
idle "/images/dressup/buttons/skin_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "skin", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "skin", "+")
imagemap: #skin details
hover "/images/dressup/buttons/skin_detail_hover.png"
idle "/images/dressup/buttons/skin_detail_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "skin_detail", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "skin_detail", "+")
hbox:
spacing 30
imagemap: #hairstyle
hover "/images/dressup/buttons/hairstyle_hover.png"
idle "/images/dressup/buttons/hairstyle_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "hairstyle", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "hairstyle", "+")
imagemap: #hair color
hover "/images/dressup/buttons/haircolor_hover.png"
idle "/images/dressup/buttons/haircolor_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "haircolor", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "haircolor", "+")
hbox:
spacing 30
imagemap: #eye shape
hover "/images/dressup/buttons/eyeshape_hover.png"
idle "/images/dressup/buttons/eyeshape_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "eyeshape", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "eyeshape", "+")
imagemap: #eye color
hover "/images/dressup/buttons/eyecolor_hover.png"
idle "/images/dressup/buttons/eyecolor_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "eyecolor", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "eyecolor", "+")
hbox: #mouth
spacing 30
imagemap: #eyebrows_s
hover "/images/dressup/buttons/brows_hover.png"
idle "/images/dressup/buttons/brows_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "brows", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "brows", "+")
imagemap:
hover "/images/dressup/buttons/mouth_hover.png"
idle "/images/dressup/buttons/mouth_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "mouth", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "mouth", "+")
hbox:
spacing 30
imagemap:
hover "/images/dressup/buttons/outfit_hover.png"
idle "/images/dressup/buttons/outfit_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "outfit", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "outfit", "+")
imagemap:
hover "/images/dressup/buttons/accessory_hover.png"
idle "/images/dressup/buttons/accessory_idle.png"
hotspot (10, 4, 32, 44) action Function(change_mc, "accessory", "-")
hotspot (187, 8, 34, 40) action Function(change_mc, "accessory", "+")
hbox:
yalign 0.5
xalign 0.5
imagemap:
hover "/images/dressup/buttons/finish_dressup_hover.png"
idle "/images/dressup/buttons/finish_dressup_idle.png"
hotspot (43, 7, 141, 44) action Return()
init python:
def change_mc(aspect, way):
global hairstyle
global haircolor
global skin
global eyeshape
global brows
global mouth
global eyecolor
global outfit
global accessory
global skin_detail
if aspect == "haircolor":
if way == "+":
haircolor += 1
if way == "-":
haircolor -= 1
if haircolor > 4:
haircolor = 1
if haircolor < 1:
haircolor = 4
if aspect == "hairstyle":
if way == "+":
hairstyle += 1
if way == "-":
hairstyle -= 1
if hairstyle > 10:
hairstyle = 1
if hairstyle < 1:
hairstyle = 10
if aspect == "outfit":
if way == "+":
outfit += 1
if way == "-":
outfit -= 1
if outfit > 8:
outfit = 1
if outfit < 1:
outfit = 8
if aspect == "eyeshape":
if way == "+":
eyes_ += 1
if way == "-":
eyes_ -= 1
if eyeshape > 7:
eyeshape = 1
if eyeshape < 1:
eyeshape = 7
if aspect == "brows":
if way == "+":
brows_s += 1
if way == "-":
brows_s -= 1
if brows > 7:
brows = 1
if brows < 1:
brows = 7
if aspect == "mouth":
if way == "+":
mouth += 1
if way == "-":
mouth -= 1
if mouth > 5:
mouth = 1
if mouth < 1:
mouth = 5
if aspect == "skin_detail":
if way == "+":
skin_detail += 1
if way == "-":
skin_detail -= 1
if skin_detail > 9:
skin_detail = 1
if skin_detail < 1:
skin_detail = 9
if aspect == "skin":
if way == "+":
skin_ += 1
if way == "-":
skin_ -= 1
if skin > 6:
skin = 1
if skin < 1:
skin = 6
if aspect == "eyecolor":
if way == "+":
eyecolor += 1
if way == "-":
eyecolor -= 1
if eyecolor > 4:
eyecolor = 1
if eyecolor < 1:
eyecolor = 4
if aspect == "accessory":
if way == "+":
accessory += 1
if way == "-":
accessory -= 1
if accessory > 7:
accessory = 1
if accessory < 1:
accessory = 7
Code: Select all
define e = Character("Eileen", ctc="ctc_blink", ctc_position="fixed")
#begin sideimage
image side avatar = LayeredImageProxy("mc", Transform(crop=(0, 0, 1000, 1000), zoom=1, xoffset=0, yoffset=0))
#end sideimage
#begin sideimage_name
define mc = Character("[mc]", image="avatar", ctc="ctc_blink", ctc_position="fixed")
#end sideimage_name
# The game starts here.
label start:
call screen dollmaker
$ mc = renpy.input("What's your name?")
$ mc = mc.strip()
e "Pleased to meet you, [mc]!"
show avatar
# These display lines of dialogue.
e "You've created a new Ren'Py game."
mc "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return