Point-based game questions.

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.
Post Reply
Message
Author
User avatar
silversporksama
Regular
Posts: 114
Joined: Tue Jul 27, 2010 4:57 am
Completed: Senpai WataMite, Last Couple Minutes
Organization: Tokkimeki
Tumblr: Tokkimeki
Deviantart: Tokkimeki
itch: tokkimeki
Location: Philippines
Contact:

Point-based game questions.

#1 Post by silversporksama » Sat Jun 25, 2011 8:56 am

I really don't understand the point-based game part of the Remembering User Choices page.

For example, what if I want an ending that needs an amount of affection points ranging between numbers x and y...?
:/ the same applies for choices.

There's that part of the code there about turtle racing, and only being able to do it if and only if the player's gift is a tortoise.

I want to apply that, only with points. So what if statement do I put if...say, I only want the certain choice to appear if the player has 51 to 60 affection points...? (And then there's a seperate choice for 61 to 70 points....etc.)


Gosh, I can't finish Amarilyo without this @A@;

User avatar
Anima
Veteran
Posts: 448
Joined: Wed Nov 18, 2009 11:17 am
Completed: Loren
Projects: PS2
Location: Germany
Contact:

Re: Point-based game questions.

#2 Post by Anima » Sat Jun 25, 2011 9:04 am

Code: Select all

if variable >= 51 and variable <= 60:
    do stuff
elif variable >= 61 and variable <= 70:
    do different stuff
Something like that?
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

User avatar
silversporksama
Regular
Posts: 114
Joined: Tue Jul 27, 2010 4:57 am
Completed: Senpai WataMite, Last Couple Minutes
Organization: Tokkimeki
Tumblr: Tokkimeki
Deviantart: Tokkimeki
itch: tokkimeki
Location: Philippines
Contact:

Re: Point-based game questions.

#3 Post by silversporksama » Sat Jun 25, 2011 9:09 am

Anima wrote:

Code: Select all

if variable >= 51 and variable <= 60:
    do stuff
elif variable >= 61 and variable <= 70:
    do different stuff
Something like that?
I guess so :o I'll test it out~
Thanks, Anima! ^^

Post Reply

Who is online

Users browsing this forum: Bing [Bot]