Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Fri May 24, 2013 3:05 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Apr 30, 2012 11:14 pm 
Regular
User avatar

Joined: Mon Apr 30, 2012 11:05 pm
Posts: 50
Location: Perth Australia
OK, so, Ive read the renpy wiki pages for this topic but they dont seem to cover what I want to do (or if they do, Ive just completely misunderstood).

Im making a dating game for a friend and I have about 4 options at the end. What I want is for the number of points for each character to affect the ending (out of 100). For exmaple- If one character has the highest points but only has, say 50 points, I want a 'friend' ending, but if a character has more than, say, 80 points then Id want to display a 'love' ending.

But Im not sure how to define this in the script, only that the highest points wins...

Sorry if that didn't make sense... Im brand new...

Any help would be appreciated


Top
 Profile Send private message  
 
PostPosted: Mon Apr 30, 2012 11:27 pm 
Miko-Class Veteran
User avatar

Joined: Sun Mar 25, 2012 7:54 pm
Posts: 559
Projects: Club Shuffle
You could have it set up so that it is an if else statement

ie

Code:
if $ boyfriendpoints >=80:
     "The boyfriend ending happens."
elif $ boyfriendpoints >=50:
     "The friend ending happens."
else:
    "The forever alone ending happens."


This is the way I would do it at least.

_________________
Image
Developer Blog for Club Shuffle - Follow and Share?
-Also! You can call me Crystal if you want.-


Top
 Profile Send private message  
 
PostPosted: Mon Apr 30, 2012 11:31 pm 
Regular
User avatar

Joined: Mon Apr 30, 2012 11:05 pm
Posts: 50
Location: Perth Australia
FatUnicornGames wrote:
You could have it set up so that it is an if else statement

ie

Code:
if $ boyfriendpoints >=80:
     "The boyfriend ending happens."
elif $ boyfriendpoints >=50:
     "The friend ending happens."
else:
    "The forever alone ending happens."


This is the way I would do it at least.


Thank you for the response (Im kind of dying here), so how would I factor in a tie? Is there a way I can favor one ending over another? or give the player a choice?


Top
 Profile Send private message  
 
PostPosted: Tue May 01, 2012 12:15 am 
Miko-Class Veteran
User avatar

Joined: Sun Mar 25, 2012 7:54 pm
Posts: 559
Projects: Club Shuffle
Hmmm...for my game I am trying to set it up so that you can't really have a tie situation. If that is the case you could choose a favored love interest and start stacking the if, elif statements in a particular way (boyfriend1 romance ending, boyfriend2 romance ending, boyfriend3 romance ending, boyfriend1 friend ending... forever alone ending). I am by no means an advanced ren'py user though so you might wait for somebody more experienced to chime in.

edit: Giving the player a choice is a good option as well depending on how you are setting things up.

_________________
Image
Developer Blog for Club Shuffle - Follow and Share?
-Also! You can call me Crystal if you want.-


Top
 Profile Send private message  
 
PostPosted: Tue May 01, 2012 12:42 am 
Regular
User avatar

Joined: Mon Apr 30, 2012 11:05 pm
Posts: 50
Location: Perth Australia
FatUnicornGames wrote:
Hmmm...for my game I am trying to set it up so that you can't really have a tie situation. If that is the case you could choose a favored love interest and start stacking the if, elif statements in a particular way (boyfriend1 romance ending, boyfriend2 romance ending, boyfriend3 romance ending, boyfriend1 friend ending... forever alone ending). I am by no means an advanced ren'py user though so you might wait for somebody more experienced to chime in.

edit: Giving the player a choice is a good option as well depending on how you are setting things up.


Thats ok, youve been really helpful, I think I'll stack the statements once I get my head around what I want to do.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group