Well I only want to ask... how can I make the choices sum up? Let me explain myself.
-Ending 1
-Ending 2
Example 1:
1. Run(Ending 1 +1)/Walk (Ending 2 +1) Chose Run. Ending 1 +1=> Ending 1= 1. Ending 2= 0
2. Eat(Ending 1 +2)/Don't eat (Ending 2 +1) Chose Eat. Ending 1 +1=> Ending 1= 3. Ending= 0
You get ending 1.
Example 2:
1. Run(Ending 1 +1)/Walk (Ending 2 +1) Chose Walk. Ending 2 +1=> Ending 1= 0. Ending 2= 1
2. Eat(Ending 1 +2)/Don't eat (Ending 2 +1) Chose Don't eat. Ending 2 +1=> Ending 1= 0. Ending= 2
You get ending 2.
Can someone explain how to do this? Thanks in advance.
Question about choices
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
-
- Regular
- Posts: 160
- Joined: Sat Jan 16, 2010 12:51 pm
- Projects: Thinking
- Location: Venezuela
- Contact:
Question about choices
This is my World.
Look forward to my game.
Thinking
Look forward to my game.
Thinking
-
- Eileen-Class Veteran
- Posts: 1265
- Joined: Fri Aug 31, 2007 7:02 am
- Projects: 0 completed game. Still haven't made any meaningfully completed games...
- Contact:
Re: Question about choices
You mean something like this?:
Code: Select all
init:
$ Ending1=0
$ Ending2=0
label choice1:
menu:
"Run":
$ Ending1+=1
"Walk":
$ Ending2+=1
label choice2:
menu:
"Eat":
$ Ending1+=2
"Don't Eat":
$ Ending2+=1
label ending:
if Ending1==3:
jump ending1
elif Ending2==2:
jump ending2
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.
Re: Question about choices
Well, exactly as you showed in your example...
1. Make variables to store the results (end1, end2 or smth)
2. Change the values during game process (like <$ end1 += 1>)
3. At the end compare the values to find what ending to show
You can read more here
http://www.renpy.org/wiki/renpy/doc/tut ... With_Menus
http://www.renpy.org/wiki/renpy/doc/tut ... er_Choices
http://www.renpy.org/wiki/renpy/doc/tut ... _the_Story
Late again...((
1. Make variables to store the results (end1, end2 or smth)
2. Change the values during game process (like <$ end1 += 1>)
3. At the end compare the values to find what ending to show
Code: Select all
init:
$ end1 = 0
$ end2 = 0
label start:
menu:
"Run(Ending 1 +1)":
$ end1 += 1
"Walk (Ending 2 +1)":
$ end2 += 1
menu:
"Eat(Ending 1 +2)":
$ end1 += 2
"Don't eat (Ending 2 +1)":
$ end2 += 1
if end1 > end2:
jump "ending_1" # label names shouldn`t have spaces
else:
pass
# here you goes if ending 2
"Ending 2"
jump "credits"
label ending_1:
"Ending 1"
jump "credits"
label credits:
"Some credits"
http://www.renpy.org/wiki/renpy/doc/tut ... With_Menus
http://www.renpy.org/wiki/renpy/doc/tut ... er_Choices
http://www.renpy.org/wiki/renpy/doc/tut ... _the_Story
Late again...((
-
- Regular
- Posts: 160
- Joined: Sat Jan 16, 2010 12:51 pm
- Projects: Thinking
- Location: Venezuela
- Contact:
Re: Question about choices
Finally I made my first choice and it works perfect. Thanks you two.
This is my World.
Look forward to my game.
Thinking
Look forward to my game.
Thinking
Who is online
Users browsing this forum: No registered users