Question on new RenPY

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.
Message
Author
MoonKarla
Regular
Posts: 30
Joined: Sat Oct 07, 2006 12:43 pm
Location: Panama
Contact:

#16 Post by MoonKarla »

PyTom wrote:If you run the "return" statement outside of a call, then it will return you to the main menu, which is a reasonable way of ending the game.

You probably want to use a renpy.imagemap to let the user pick a character... see the reference manual and the UI portion of the demo to see how that works.
return is indented 4 or 8 spaces?
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#17 Post by PyTom »

It's indented to the same level as the surrounding code. So you would write something like:

Code: Select all

label good_ending:
    "And we lived happily ever after."

    l "And made many babies!"

    ".:. Good ending."

    return
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

MoonKarla
Regular
Posts: 30
Joined: Sat Oct 07, 2006 12:43 pm
Location: Panama
Contact:

#18 Post by MoonKarla »

My god.. I've been hours here correcting errors here and they are endless!!!

But ere's one thatkeeps on popping and I can't uderstand it

Code: Select all

ParseError: On line 49 of C:\Documents and Settings\Karla\Mis documentos\renpy-5.6.4-full\renpy-5.6.4\Quiz/game/script.rpy: say statement does not expect a block.

t "So..which student will take the test first?"
                                               ^

While parsing C:\Documents and Settings\Karla\Mis documentos\renpy-5.6.4-full\renpy-5.6.4\Quiz/game/script.rpy.
What that means?
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#19 Post by PyTom »

This means that the next line (the one following the given one) is improperly indented.
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#20 Post by monele »

This means that the next line (the one following the given one) is improperly indented.
Thought : if this is almost always the reason, maybe you could add it as a hint to the error message? ^^. I know I don't like cryptic error messages when programming, so I bet non-programmers must loathe them :)

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#21 Post by PyTom »

Done.

The worst error message Ren'Py produces is one in inherits from python, one that is caused when Python code is utterly wrong. It is:

SyntaxError: invalid syntax

I've heard it described as "simultaneously overly terse and redundant". Unfortunately, there's not much I can do about it.
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

MoonKarla
Regular
Posts: 30
Joined: Sat Oct 07, 2006 12:43 pm
Location: Panama
Contact:

#22 Post by MoonKarla »

Ok..I don't understand something, it's telling me that the line following the line 147 isn't properly indented, can anyone tell me where it should be intended -___-

Code: Select all

 menu:
        "Galaxies are formed of...?"
        "Celestial bodies":
            $ score += 1
            
            m "Very good! you got it right!"
            jump question6
There appears lines from 144-149. It's a menu and the first option
Image

MoonKarla
Regular
Posts: 30
Joined: Sat Oct 07, 2006 12:43 pm
Location: Panama
Contact:

#23 Post by MoonKarla »

Hiii I'm back!! I finished the question game with your help ^^ Thank you all. Now I started one more But I wonder something:

You know the frame with widgets in the main menu (you know..the one that starts with Start Game). Well how can I move it from left to right??
Image

Guest

#24 Post by Guest »

ANother tiny question: How do I make a character to move either to the right or left? as if she was trying to show somehting on the background.

MoonKarla
Regular
Posts: 30
Joined: Sat Oct 07, 2006 12:43 pm
Location: Panama
Contact:

#25 Post by MoonKarla »

Last post was mine but I fogot the forum log me out -_-U
Image

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#26 Post by DaFool »

show MyCharacter at left with move

...something like that.

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#27 Post by DaFool »

with regards to widgets, there is probably some alignment numbers you can change in options.rpy.

PyTom, sorry for that recent slowdown that seemed like a connection attack: crappy internet cafe computer :(

MoonKarla
Regular
Posts: 30
Joined: Sat Oct 07, 2006 12:43 pm
Location: Panama
Contact:

#28 Post by MoonKarla »

Hii!! Thanks to all you guys, I finished already one game! I even added credits but I need to know a little detail: how do I show the score in the screen during the game so the player can see actually how much points he/she has instead of knowing at the end?

and I had to start another one (the teacher seems not to know how log it takes to program) that its a pseudo-planetarium, the game will explain you about the solar system and stuff but..How do I make the interface or style of the game fancier (for the planetarium)??
Image

chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

#29 Post by chronoluminaire »

MoonKarla wrote:Hii!! Thanks to all you guys, I finished already one game! I even added credits but I need to know a little detail: how do I show the score in the screen during the game so the player can see actually how much points he/she has instead of knowing at the end?
You can do this with the renpy.watch function. For example:

Code: Select all

init:
 $ renpy.watch("PlayerPoints")
If you want to take some numeric variables (PlayerPoints, PlayerLives) and combine them with a string, you can do this:

Code: Select all

init:
    $ renpy.watch("'SCORE: ' + `PlayerPoints` + ' points; ' + `PlayerLives` + ' lives left!'")
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#30 Post by DaFool »

Wow, it seems like there might actually be as many completed Ren'Py games in this month alone as in the entire year 2005! (8 going on 9)
MoonKarla wrote: and I had to start another one (the teacher seems not to know how log it takes to program) that its a pseudo-planetarium, the game will explain you about the solar system and stuff but..How do I make the interface or style of the game fancier (for the planetarium)??
My first suggestion would be to define a new font with high-tech greenish letters and a dark blackish background textbox.

But it might be simpler to just have a new character declaration (call it 'PlanetariumNarration' or something) and use the default subtitle SFfont (see the Ren'Py demo tutorial for the specific lines of code). That way, with the removal of the textbox, you'll have the whole screen to display the galaxies.

Post Reply

Who is online

Users browsing this forum: No registered users