Anyway, I have a lot of images kicking around and I need to check gender each time I want to manipulate one. That's only going to get worse when I offer multiple mugshots. So I'd like to set up an alias so I have one name or variable that for each type of image (sidebar, figure, mugshot, etc...) and just point them at the images chosen by the player. I saw this was doable from the documentation somewhere (or it might have been the pre-release tutorial code) but I can't seem to make it work.
What I'm doing at the moment works, but it's not going to scale well, so I was wondering if anyone could give me a couple of pointers. Here's some of my code:
Code: Select all
#
# pick a picture for the player - I want some degree of customisation here, long term
# for now we'll just do one male, one female
#
d "All right. [player.name], now we need a mugshot."
hide detective
if player.gender == "M":
show mpc1_mugshot at Position(yalign = 0.2)
$ p = Character(player.name, color="#008000", image="mpc1")
d "Does that look like you?"
show mpc1_mugshot at Position(yalign = 0.2):
linear 0.3 xalign 0.0
else:
show fpc1_mugshot at Position(yalign = 0.2)
$ p = Character(player.name, color="#008000", image="fpc1")
d "Does that look like you?"
show fpc1_mugshot at Position(yalign = 0.2):
linear 0.3 xalign 0.0
menu:
"Yeah, that's me":
p "Looks close enough, I suppose."
d "Cool! I'll get that entered into the official record."
"It kind of looks like me. A bit. If you don't look at it":
p "It kind of looks like me. A bit. If you don't look at it."
d "I'll take that as a \"yes\", wiseass!"
"That's nothing like me!":
p "That's nothing like me!"
d "Too bad, seeing as it's the only one we got. It'll just have to do."
d "We can maybe get a better likeness a little later on"
#
# I could probably roll this into selection, but I want to offer multiple mugshots later on
#
if player.gender == "M":
hide mpc1_mugshot
else:
hide fpc1_mugshot