Search found 255 matches

by SleepKirby
Mon Mar 21, 2011 11:58 pm
Forum: Ren'Py Questions and Announcements
Topic: In Game Menu
Replies: 14
Views: 1343

Re: In Game Menu

Oh, wait - in your previous post you used the label "navigation" to define the navigation menu. I should've noticed that. How about try the other idea I mentioned - making the game menu screen be the navigation screen, like this: init python: _game_menu_screen = "navigation" And ...
by SleepKirby
Mon Mar 21, 2011 11:39 pm
Forum: Ren'Py Questions and Announcements
Topic: In Game Menu
Replies: 14
Views: 1343

Re: In Game Menu

Oh yeah, whoops. That's a line of python that isn't in a python block, so it needs a $ in front of it.

Code: Select all

    $ layout.navigation(None)  # Is this right?
by SleepKirby
Mon Mar 21, 2011 10:33 pm
Forum: Ren'Py Questions and Announcements
Topic: In Game Menu
Replies: 14
Views: 1343

Re: In Game Menu

Yes, actually, I think setting the _game_menu_screen variable works equally well for specifying a label that has your game menu code. Um... offhand, I'm not sure what the UI-function-equivalent of "use navigation" is. Maybe layout.navigation(None)? Or maybe you could set _game_menu_screen ...
by SleepKirby
Sun Mar 20, 2011 7:21 pm
Forum: Ren'Py Questions and Announcements
Topic: My choices created an infinite loop D: I need to stop it
Replies: 2
Views: 555

Re: My choices created an infinite loop D: I need to stop it

At the end of the happybird part, you need to jump over the angrybird part by using another label, like this: label happybird: b "Of course. Thank you for asking so nicely. Here it is." p "Thank you!" "Puppy and Kitty walked off with their ball, ready to play some more."...
by SleepKirby
Sun Mar 20, 2011 6:03 pm
Forum: Ren'Py Questions and Announcements
Topic: unsupported operand type(s) for -: 'int' and 'str'
Replies: 6
Views: 3233

Re: unsupported operand type(s) for -: 'int' and 'str'

Oh, it looks like Anima's referring to a line in renpy/display/core.py. There's nothing wrong with it, but that's where the crash is happening, because some part of your code is specifying an xanchor value as a string instead of a number. I haven't looked at your code to see exactly where, but just ...
by SleepKirby
Sat Mar 19, 2011 3:22 pm
Forum: Ren'Py Questions and Announcements
Topic: In Game Menu
Replies: 14
Views: 1343

Re: In Game Menu

By default, the game menu is the save screen. Here's how you can create a custom game menu:

Code: Select all

init python:
    _game_menu_screen = "my_game_menu_screen"
    
screen my_game_menu_screen:
    
    tag menu
    
    use navigation
This game menu screen will only have the navigation menu.
by SleepKirby
Fri Mar 18, 2011 8:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Variables used in Lists? [Solved]
Replies: 8
Views: 961

Re: Variables used in Lists?

I'd go with the function (second option). Best not to have too many globals floating around, I think. And if you use a function, even if you have other variables elsewhere in your code called x, Python won't get confused: (1) A function parameter (the thing inside the parenthesis) is at the "mo...
by SleepKirby
Thu Mar 17, 2011 12:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Displaying numerical statistics (solved)
Replies: 2
Views: 529

Re: Displaying numerical statistics

"Body %(body)d" is what you'd use if this were a line of Ren'Py, like if you were embedding the value in some game dialogue, or if you were writing a custom screen in screen language. However, body_overlay is a Python function, so you can't do that. Since this part is Python, you need some...
by SleepKirby
Wed Mar 16, 2011 7:14 pm
Forum: Ren'Py Questions and Announcements
Topic: How to prevent players from going back
Replies: 8
Views: 1681

Re: How to prevent players from going back

A few possibilities: (1) config.rollback_enabled = False Disables rollback completely, so that the player can't go back to previous dialogue at all. This gets the same effect as setting config.hard_rollback_limit to 0 (as suggested earlier), though un-enabling rollback like this might be more intuit...
by SleepKirby
Mon Mar 14, 2011 2:34 am
Forum: Ren'Py Questions and Announcements
Topic: Looping music from the middle of a song
Replies: 5
Views: 2361

Re: Looping music from the middle of a song

Yeah, that method goes something like: play music "song_intro.ogg" queue music "song_mainloop.ogg" which works because a music track loops by default, unless there's another music track on the queue. Thus, this would play the intro once and then loop the mainloop. Then all you ha...
by SleepKirby
Sat Mar 12, 2011 3:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Looping music from the middle of a song
Replies: 5
Views: 2361

Re: Looping music from the middle of a song

I've had three unsuccessful attempts at this so far: (1) Using renpy.pause or ui.timer a) the loop timer is stopped as soon as I make an interaction (e.g. advancing the dialogue), making this unusable unless the player just sits there. (2) Using DynamicDisplayable: I hijacked this feature to do musi...
by SleepKirby
Sat Mar 05, 2011 1:53 am
Forum: Ren'Py Questions and Announcements
Topic: Looping music from the middle of a song
Replies: 5
Views: 2361

Looping music from the middle of a song

I'm currently trying to make Ren'Py loop a part of a music track (say, skipping the intro) instead of looping the whole track from the end to the start. (As far as I've read, Ren'Py can't just start playing a music file from anywhere besides the start, which makes this tricky.) I know that a workaro...
by SleepKirby
Sun Feb 06, 2011 2:46 pm
Forum: Ren'Py Questions and Announcements
Topic: Intro music track seamlessly switching to a loop track
Replies: 5
Views: 995

Re: Intro music track seamlessly switching to a loop track

I don't think so - the music tracks transition seamlessly in Winamp and iTunes.

Hmm, so it works for you? Maybe I'll try again with .ogg songs (or just different songs) and see what happens.
by SleepKirby
Sun Feb 06, 2011 4:59 am
Forum: Ren'Py Questions and Announcements
Topic: Defining and calling user-defined functions?
Replies: 7
Views: 10067

Re: Defining and calling user-defined functions?

if moll_currentattack is "facepunch" or "brassknuckle": (do stuff) Does that work if you make it if moll_currentattack is "facepunch" or moll_currentattack is "brassknuckle": ? My thinking is that "brassknuckle" alone can't be an operand to a boolea...