Search found 358 matches

by herenvardo
Fri Nov 25, 2011 8:51 pm
Forum: Ren'Py Questions and Announcements
Topic: Multiple random situations triggered in stat-boosting games?
Replies: 8
Views: 919

Re: Multiple random situations triggered in stat-boosting ga

I built this just because I was bored: init python: class StringRotator(object): def __init__(self, *strings): self.strings = strings[:] self.current = -1 self.max = len(strings) def __str__(self): self.current += 1 if (self.current >= self.max): self.current = 0 return self.strings[self.current] de...
by herenvardo
Fri Nov 25, 2011 8:09 pm
Forum: General Discussion
Topic: Post your workspace / room
Replies: 67
Views: 7465

Re: Post your workspace / room

There it goes: a blurried picture of a programmer's mess. As you can see, the basics are all there: widescreen, G-110 keyboard, 6 button mouse, tobacco (+ rolling paper, filter tips, lighter, and ashtray), and 7.1 speakers. And there are a few extras, like the printer/scanner (supposedly it also wor...
by herenvardo
Thu Nov 24, 2011 7:19 pm
Forum: Ren'Py Questions and Announcements
Topic: Screen ends when returning from a function [solved+]
Replies: 8
Views: 1122

Re: Screen ends when returning from a function

Now I am confused. I can call curry functions with arguments, just not non-curry functions? It looks like the main point is still evading you. Probably I failed to explain it properly. So let me try again, going step by step: The "action" you provide for a button should be a function. The...
by herenvardo
Thu Nov 24, 2011 3:59 pm
Forum: Ren'Py Questions and Announcements
Topic: Screen ends when returning from a function [solved+]
Replies: 8
Views: 1122

Re: Screen ends when returning from a function

I'm afraid you are overcomplicating things ^^' If I understand your code and your intention, you are trying to use SetVariable to set "clickedaction" to the appropriate value, and then use ChangeAction to set the actual field you need using the value just stored on "clickedaction"...
by herenvardo
Thu Nov 24, 2011 1:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Screen ends when returning from a function [solved+]
Replies: 8
Views: 1122

Re: Screen ends when returning from a function

Uh, I think you lost me there. First of all, the function you give executes immediately - when the screen is run, rather than when the button is clicked. You'll need to curry it (see the documentation for renpy.curry on the wiki) to make the semantics what you want. Why does it execute immediately ...
by herenvardo
Thu Nov 24, 2011 12:49 pm
Forum: Ren'Py Questions and Announcements
Topic: Accessing Return() values
Replies: 9
Views: 1679

Re: Accessing Return() values

The value gets stored in the _return global variable. Just make sure to retrieve it before anything else "returns" something and replaces the value. For example: call screen myScreen $ myScreenReturnedValue = _return # now the value is safe # Do more stuff ... # And later use myScreenRetur...
by herenvardo
Thu Nov 24, 2011 12:38 pm
Forum: Ren'Py Questions and Announcements
Topic: Function with variable values question [SOLVED]
Replies: 4
Views: 586

Re: Function with variable values question [SOLVED]

While netravelr's answer is sound and correct, I'd like to add some more insight to what's going on, and to provide a slight improvement on the syntax. First, the code I'd recommend you to use for this specific case is this: init python: def SetOldValues(): global var_a_old, var_b_old, var_c_old var...
by herenvardo
Wed Nov 23, 2011 4:53 am
Forum: Ren'Py Questions and Announcements
Topic: Menus and image transformations: don't hide the dialogue?
Replies: 11
Views: 1772

Re: Menus and image transformations: don't hide the dialogue

Disclaimer : I haven't done too much Ren'py coding since 2008, and I am probably not aware of all the changes to the engine. Take these suggestions with a grain of salt. That's obvious. And I would have to copy every single line for every single menu manually. It should be possible to hack this thr...
by herenvardo
Tue Nov 22, 2011 9:35 am
Forum: Ren'Py Questions and Announcements
Topic: Catching up with the engine: screen and define
Replies: 4
Views: 728

Re: Catching up with the engine: screen and define

Basically, an interaction ends when control leaves call screen. This can occur when Return returns something, a creator-defined action returns something, or a Jump occurs. (Also some other kinds of control transfer, like Quit, MainMenu, and so on.) One last question (I hope) for now: Is it possible...
by herenvardo
Mon Nov 21, 2011 9:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Catching up with the engine: screen and define
Replies: 4
Views: 728

Re: Catching up with the engine: screen and define

Thanks for such a detailed answer. I have been away for the weekend; but I have found some time to re-read the documentation and, combined with your answers, things start making sense ^^ There are a few more things I'd like to ask (this time much more concise, I hope): 1) About define statements, my...
by herenvardo
Thu Nov 17, 2011 6:05 pm
Forum: Ren'Py Questions and Announcements
Topic: Catching up with the engine: screen and define
Replies: 4
Views: 728

Catching up with the engine: screen and define

Back into the action after three long years, I did expect things would have changed quite a bit in the Ren'Py engine. In fact, I was surprised to see that we are still in the 6.x line :P I have been reviewing the documentation and most of the stuff seems clear enough, but there are a few details tha...
by herenvardo
Wed Nov 16, 2011 12:36 pm
Forum: Ren'Py Questions and Announcements
Topic: "Cross-breeding" labels and callables
Replies: 3
Views: 612

Re: "Cross-breeding" labels and callables

If it's okay to terminate the function, and the _entire python block it's in_ I hope it'd be ok, but I'd need to confirm what "terminate the function" exactly means. Let's say I have these scattered around my scripts: python: # This would most probably be within an init: class MyCallableC...
by herenvardo
Wed Nov 16, 2011 7:51 am
Forum: Ren'Py Questions and Announcements
Topic: Timer question
Replies: 4
Views: 524

Re: Timer question

Both netravelr's and DragoonHP's replies can solve your problem, but there are a couple of things you should watch for: 1) Make sure to test how your timing code interacts with save/load and rollback. Especially, if you use the timestamps approach described by netravelr, you don't want to use, after...
by herenvardo
Tue Nov 15, 2011 8:13 pm
Forum: Ren'Py Questions and Announcements
Topic: "Cross-breeding" labels and callables
Replies: 3
Views: 612

"Cross-breeding" labels and callables

It's been over three years since I last tortured the Ren'py engine, so I had to go for something big :twisted: ! Actually, what I'm looking for is not that big, and it is in fact a 180º turn from what I used to do back in 2008: rather than building huge python blocks, I'm looking for ways to do as m...
by herenvardo
Thu Apr 02, 2009 1:42 pm
Forum: Ren'Py Questions and Announcements
Topic: [April Fools] More Feature Deprecations
Replies: 21
Views: 2741

Re: [April Fools] More Feature Deprecations

Good job, if i had seen it yesterday i would have totaly fallen for it. Me too ^^; - menu Similarly, the menu statement was a misfeature. It makes all the menus in every game look pretty much alike. It's probably best to get rid of it, and just encourage people to use ui.textbutton or ui.imagebutto...