Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
-
queergames
- Newbie
- Posts: 12
- Joined: Mon Oct 28, 2013 11:37 pm
-
Contact:
#1
Post
by queergames » Mon Oct 28, 2013 11:43 pm
Variable is probably the wrong word. Anyway, My newest game is going to have 4 different appearance choices for the protagonist. I am trying figure out a way to do this which would be shorter than the way I did it in my last game. Last time I just did it as follows:
Code: Select all
if the_choice:
show prot_masc at Position(xalign=1.0, yalign=0.35)
else:
show prot_fem at Position(xalign=1.0, yalign=0.35)
However, I was hoping there was a way I could do it so I could just say "show prot" I've been puzzling over this for a while, but so far the game has just whined at me about not expecting stuff, or it's displayed the last choice no matter what. Clearly I have no idea where to even start, so that's where you guys come in.
Solution:
ConditionSwitch
Last edited by
queergames on Tue Oct 29, 2013 5:00 pm, edited 1 time in total.
-
Elmiwisa
- Veteran
- Posts: 476
- Joined: Sun Jul 21, 2013 8:08 am
-
Contact:
#2
Post
by Elmiwisa » Tue Oct 29, 2013 1:04 am
Why didn't you use ConditionSwitch?
-
queergames
- Newbie
- Posts: 12
- Joined: Mon Oct 28, 2013 11:37 pm
-
Contact:
#3
Post
by queergames » Tue Oct 29, 2013 1:29 am
Because I don't know what that is, so explain it to me or link me to a page explaining it.
-
trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
-
Contact:
#4
Post
by trooper6 » Tue Oct 29, 2013 1:59 am
Go to this page, and look up Condition switch.
http://www.renpy.org/doc/html/displayables.html
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
-
queergames
- Newbie
- Posts: 12
- Joined: Mon Oct 28, 2013 11:37 pm
-
Contact:
#5
Post
by queergames » Tue Oct 29, 2013 5:00 pm
Oh sweet. This is perfect. Thanks so much!
Users browsing this forum: No registered users