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 Tue Jun 18, 2013 10:19 pm

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  [ 6 posts ] 
Author Message
PostPosted: Thu May 24, 2012 12:43 pm 
Veteran
User avatar

Joined: Mon May 14, 2012 1:27 am
Posts: 350
Projects: Driftwood
Organization: MV Swag Squad
This may be a little confusing, but I'm wondering if the system is set so that you can make a double If statement which will allow for customization of different menu options like this...

Image

Or does it have to be setup like this

Image

Basically, I'm trying to get figure out the code to allow this to happen from the flowchart I made for the project I'm working on. The two options are linked together to jump to the new setting...but have different variables as to what makes it possible to choose said options. Any suggestions...?

Image

_________________
You gotta be kitten' me, Stop it right meow, I aint even lion.

Projects: Driftwood

Image - Logo by WoPairs


Last edited by wakagana on Thu May 24, 2012 4:26 pm, edited 2 times in total.

Top
 Profile Send private message  
 
PostPosted: Thu May 24, 2012 1:10 pm 
Regular
User avatar

Joined: Tue Oct 04, 2011 9:57 am
Posts: 150
Location: Carrollton, TX
Completed: May-Chan
Projects: Fairy Tale, What do you see, Alice Hunt
Well, this code hides the menu choice if the conditions of the if statement isn't fulfilled.

P.S. - Not a spelling nazi, but Neutral is spelled incorrectly.

Code:
    menu:
        "I'll go bug Tayrn" if T_points >  Nuetral_points:
            $ T_points += 2
            jump Tayrnlunch
        "Choice 2" if MA_points > Y_points:
            $ Y_points += 1
            jump Yukolunch


Top
 Profile Send private message  
 
PostPosted: Thu May 24, 2012 1:19 pm 
Miko-Class Veteran
User avatar

Joined: Fri Dec 11, 2009 5:25 pm
Posts: 981
You could make complex conditions using logical connectives "and", "or", "not", so it might look like
Code:
if varA<varB or varC<0:
    menu:
or
if varA<varB:
    if varC<0:
        menu:
    else:
        menu:

But if I understood correct, you need
Code:
menu:
    "Go find Tayrn" if T_points > Neutral_points:
        $ T_points += 2
    "Go find Yuko" if MA_points > Y_points:
        $ Y_points += 1
    "A Strange choice, in case right game conditions not met" if (T_points <= Neutral_points) or (MA_points <= Y_points):
        "????"


P.S. I'm sloooooo


Top
 Profile Send private message  
 
PostPosted: Thu May 24, 2012 2:31 pm 
Veteran
User avatar

Joined: Mon May 14, 2012 1:27 am
Posts: 350
Projects: Driftwood
Organization: MV Swag Squad
I apologize for being a little confusing. x.x

Okay, so the overall goal I am trying to reach, is to have this in a menu-set up form.

Image

So, I am curious as to whether this is even possible? I figure it would require a varying amount of menu's that are all based on if statements.

Image

Is what I have so far...I'm figuring that...I'll need a different menu for each set of possible numbers because the choices may be different. All require some form of point Aside from the one with May.

_________________
You gotta be kitten' me, Stop it right meow, I aint even lion.

Projects: Driftwood

Image - Logo by WoPairs


Top
 Profile Send private message  
 
PostPosted: Thu May 24, 2012 2:58 pm 
Regular
User avatar

Joined: Tue Oct 04, 2011 9:57 am
Posts: 150
Location: Carrollton, TX
Completed: May-Chan
Projects: Fairy Tale, What do you see, Alice Hunt
Well, if you're going for the menu structure you have in the choice map there, then this will work.
It just hides the choices that don't have enough points. No matter what, the "Go see what May is doing" will show because it has no if statement on it. You do not need multiple menus for the five choices because they (except Mary) will not show if the player doesn't have the correct amount of points.

Code:
    menu:
        "I'll go bug Tayrn." if T_points >  Neutral_points:
            $ T_points += 2
            jump Tayrnlunch
        "I'll go see if Yuko wants to talk." if MA_points > Y_points:
            $ Y_points += 1
            jump Yukolunch
        "Go see what May is doing..":
            $ MY_points += 1
            jump Maylunch
        "Maybe I can learn a little about Garen." if G_points > Neutral_points:
            $ G_points += 1
            jump Garenlunch
        "I'll go find Ellen." if EE_points > Neutral_points:
            $K_points += 1
            jump Ellenlunch


Top
 Profile Send private message  
 
PostPosted: Thu May 24, 2012 4:26 pm 
Veteran
User avatar

Joined: Mon May 14, 2012 1:27 am
Posts: 350
Projects: Driftwood
Organization: MV Swag Squad
Thank you very much for the help Scotty. =) Works perfectly!

_________________
You gotta be kitten' me, Stop it right meow, I aint even lion.

Projects: Driftwood

Image - Logo by WoPairs


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Graph


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