Love Point Problem

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
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Love Point Problem

#1 Post by Fenrir34 »

So I have four characters, each with their own path. I want to make so the character with the highest points is the path you get but it's not working right.

Here's the code I put in


if kagomepoints > 2:
call kagomepath


if ryupoints > 3:
call ryupath

if zankipoints > 4:
call zankipath


if harupoints > 2:
call harupath

please help me

User avatar
ShippoK
Veteran
Posts: 348
Joined: Wed Mar 28, 2012 8:59 pm
Projects: Eyes of Gold (In-Progress)
Organization: (Red Moon)
Location: Glorious Nippon (A.K.A the USA)
Contact:

Re: Love Point Problem

#2 Post by ShippoK »

Ah, point codes... They're the greatest hurdle through any newcommer.

Try this.

Code: Select all

if kagomepoints >= 2 and kagomepoints:
call kagomepath

if ryupoints >= 3 and ryupoints:
call ryupath

if zankipoints >= 4 and zankipoints:
call zankipath

if harupoints >= 2 and harupoints:
call harupath

Remeber;
>= More or Equal
<= Less or Equal points
Much Appreciated for those who took the Survey!

Image Image
Eyes of Gold [BL (Suspense) (+18)] IN-PROGRESS
Alternate Online [(Friendship) (+10)] ON-HOLD
DeviantART• •[Honest critique] - 'Honesty is its own reward.'

User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Love Point Problem

#3 Post by Fenrir34 »

ShippoK wrote:Ah, point codes... They're the greatest hurdle through any newcommer.

Try this.

Code: Select all

if kagomepoints >= 2 and kagomepoints:
call kagomepath

if ryupoints >= 3 and ryupoints:
call ryupath

if zankipoints >= 4 and zankipoints:
call zankipath

if harupoints >= 2 and harupoints:
call harupath

Remeber;
>= More or Equal
<= Less or Equal points

oh ok. Thank so much. But can you show how to write that? Not good with these codes very much :(

User avatar
ShippoK
Veteran
Posts: 348
Joined: Wed Mar 28, 2012 8:59 pm
Projects: Eyes of Gold (In-Progress)
Organization: (Red Moon)
Location: Glorious Nippon (A.K.A the USA)
Contact:

Re: Love Point Problem

#4 Post by ShippoK »

Fenrir34 wrote: oh ok. Thank so much. But can you show how to write that? Not good with these codes very much :(

Code: Select all


label start:
    define MC = Character('(MC):', color="#4C4646") #Sets up the names
    define Kagome = Character('(Kagome):', color="#4C4646")

    $ callkagomepath = False #Opens or Closes labels
    $ callharupath = False
    $ callzankipath = False
    $ callryupath = False
    $ afterschool = True

label afterschool: #Example label

    MC "Let's call..." #MC Talking

    #If the numbers above meet they will jump to the label and ignore the rest.

    if kagomepoints >= 2 and kagomepoints: 
    #If Kagome has this number, she'll be called while the rest are ignored.
        $ callkagomepath = True
        jump callkagomepath #This jumps to label Callkogomepath. Same for the rest
    
    if ryupoints >= 3 and ryupoints: #If Kagome does not, then Ryu will and so on.
        $ callryupath = True
        jump callryupath
    
    if zankipoints >= 4 and zankipoints:
        $ callzankipath = True
        jump callzankipath
    
    if harupoints >= 2 and harupoints:
        $ callharupath = True
        jump callharupath

#If no one meets it.
     MC "My mother!"
     jump nextscene
        
label callkagomepath:
    MC "Hello Kagome!"
    kagome "Blah, Blah, Blah"
    jump nextscene

label nextscene:
    "The next day..."
    
There's a more fancier way to do it, but this is how I go around to making it.
(I didn't put to much did I?)
Much Appreciated for those who took the Survey!

Image Image
Eyes of Gold [BL (Suspense) (+18)] IN-PROGRESS
Alternate Online [(Friendship) (+10)] ON-HOLD
DeviantART• •[Honest critique] - 'Honesty is its own reward.'

User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Love Point Problem

#5 Post by Fenrir34 »

ShippoK wrote:
Fenrir34 wrote: oh ok. Thank so much. But can you show how to write that? Not good with these codes very much :(

Code: Select all


label start:
    define MC = Character('(MC):', color="#4C4646") #Sets up the names
    define Kagome = Character('(Kagome):', color="#4C4646")

    $ callkagomepath = False #Opens or Closes labels
    $ callharupath = False
    $ callzankipath = False
    $ callryupath = False
    $ afterschool = True

label afterschool: #Example label

    MC "Let's call..." #MC Talking

    #If the numbers above meet they will jump to the label and ignore the rest.

    if kagomepoints >= 2 and kagomepoints: 
    #If Kagome has this number, she'll be called while the rest are ignored.
        $ callkagomepath = True
        jump callkagomepath #This jumps to label Callkogomepath. Same for the rest
    
    if ryupoints >= 3 and ryupoints: #If Kagome does not, then Ryu will and so on.
        $ callryupath = True
        jump callryupath
    
    if zankipoints >= 4 and zankipoints:
        $ callzankipath = True
        jump callzankipath
    
    if harupoints >= 2 and harupoints:
        $ callharupath = True
        jump callharupath

#If no one meets it.
     MC "My mother!"
     jump nextscene
        
label callkagomepath:
    MC "Hello Kagome!"
    kagome "Blah, Blah, Blah"
    jump nextscene

label nextscene:
    "The next day..."
    
There's a more fancier way to do it, but this is how I go around to making it.
(I didn't put to much did I?)
thank you so much. I think this will help. By the way do you know a way for me to do side images. I've seen many people do and I kind of wanted it for my main character

User avatar
Suwamoto
Regular
Posts: 66
Joined: Wed Sep 05, 2012 7:36 am
Contact:

Re: Love Point Problem

#6 Post by Suwamoto »


User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Love Point Problem

#7 Post by Fenrir34 »

Suwamoto wrote:http://www.renpy.org/doc/html/side_imag ... ide-images

That's one way to do that oxo

thank you very much :D

Post Reply

Who is online

Users browsing this forum: Google [Bot]