Help with simple call menuitems

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
frustratedsquirrel
Newbie
Posts: 1
Joined: Sat Dec 20, 2008 9:20 am
Contact:

Help with simple call menuitems

#1 Post by frustratedsquirrel »

I'm at the stage where a call menuitem would be very handy for my game in progress.

However, I find the explanation in the docs to be a little difficult to understand.

Can someone please give me an example of how I would use the call menuitem syntax?

I only want to have menus that when returned to, ommit the choices that the user has already chosen.

JQuartz
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: Help with simple call menuitems

#2 Post by JQuartz »

I don't know what a call menuitem is but a call should work for your case as well. Here's an example:

Code: Select all

    $ stupid=False
    $ shiny= False
menu talk:
    "Hi, Sasuke! You look stupid."if stupid==False:
        "... I hate you, Naruto. Go die."
        $ stupid=True
    "Hi, Sasuke! Does your hair always look so soft and shiny? Is it natural?"if shiny == False:
        "Everything about me is natural, Naruto."
        $ shiny= True
        "new value?"
call talk
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.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Help with simple call menuitems

#3 Post by PyTom »

You'd probably want a jump here. You should only use call when paired with return, not by itself like that.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

JQuartz
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: Help with simple call menuitems

#4 Post by JQuartz »

Thanks for the suggestion Pytom. 7 month away from Ren'py and my coding skills practically gone. whine X3
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.

Post Reply

Who is online

Users browsing this forum: No registered users