Search found 52 matches
- Mon Dec 07, 2020 2:39 am
- Forum: Ren'Py Questions and Announcements
- Topic: define changes and update the default
- Replies: 6
- Views: 421
Re: define changes and update the default
Sorry, but what exactly force you to use DEFINE? If the game is not released yet there's no reason to keep define in place of default, that directly solve all of your issues. The fact that it's a sandbox that is going to be updated every month or so. And I'm working right now on the quest system. I...
- Sat Dec 05, 2020 8:01 am
- Forum: Ren'Py Questions and Announcements
- Topic: define changes and update the default
- Replies: 6
- Views: 421
Re: define changes and update the default
object properties are saved, so you actually have to start a new game in order for the test1 object to be redefined and use the new update_list. I suggest taking a look at special labels, especially after_load: https://www.renpy.org/doc/html/label.html#special-labels. you can use the label in order...
- Sat Dec 05, 2020 7:24 am
- Forum: Ren'Py Questions and Announcements
- Topic: define changes and update the default
- Replies: 6
- Views: 421
Re: define changes and update the default
you forgot the instance parameter itself (self) in your constructor. and don't define something that you're planning to change/modify once declared. default them. and avoid using any reserved names, list is a reserved name: https://www.renpy.org/doc/html/reserved.html#reserved-names. It was an exam...
- Sat Dec 05, 2020 7:05 am
- Forum: Ren'Py Questions and Announcements
- Topic: define changes and update the default
- Replies: 6
- Views: 421
define changes and update the default
Hi there. I order for me to have an easier life when updating the game I need my default variables to get the latest version of a define variable. So in the code down below you see a class that receives a list. The way it is now if I save the game and modify the updated_list when I load my test1 it'...
- Thu Nov 26, 2020 10:47 am
- Forum: Ren'Py Questions and Announcements
- Topic: renpy.return from screen
- Replies: 9
- Views: 616
Re: renpy.return from screen
Thanks. It works perfectly!gas wrote: ↑Thu Nov 26, 2020 10:39 amUse just after the call line
and stored will be equal the returned value.Code: Select all
call screen test $ stored = _return
...as the guy writing the same time as me correctly said...
- Thu Nov 26, 2020 10:47 am
- Forum: Ren'Py Questions and Announcements
- Topic: renpy.return from screen
- Replies: 9
- Views: 616
Re: renpy.return from screen
By the way. Is there a way to know what my screen returned? hell_oh_world already demonstrated it, but there's a built-in special variable called _return that automatically stores whatever is returned from a screen or a return statement. label start: call screen test "Continuation... Return value i...
- Thu Nov 26, 2020 10:23 am
- Forum: Ren'Py Questions and Announcements
- Topic: renpy.return from screen
- Replies: 9
- Views: 616
Re: renpy.return from screen
If the function in the Function action returns value other than None, then it will end the interaction and return that value. init python: def myReturn(): return True # return any value other than None to end the interaction. screen test(): texbutton "Return" action Function(myReturn) label start: ...
- Thu Nov 26, 2020 10:21 am
- Forum: Ren'Py Questions and Announcements
- Topic: renpy.return from screen
- Replies: 9
- Views: 616
Re: renpy.return from screen
Hi, hapciupalit , Why not use another label or local label: label test: "something goes here" call screen test_screen() label .something: "I want to be back here" screen test_screen(): imagebutton: idle "P1.jpg" action Function(testFunc) init python: def testFunc(): if something: renpy.jump("test.s...
- Wed Nov 25, 2020 12:38 pm
- Forum: Ren'Py Questions and Announcements
- Topic: renpy.return from screen
- Replies: 9
- Views: 616
renpy.return from screen
Hi there, I have a label and a screen with a button. When the button is pressed I call a function which checks for something and if that is True then it should return back in the label. label test: "something goes here" call screen test_screen() "I want to be back here" screen test_screen(): imagebu...
- Sat Nov 21, 2020 5:23 am
- Forum: Ren'Py Questions and Announcements
- Topic: More types of say
- Replies: 10
- Views: 682
Re: More types of say
in your code, you actually passed already the name in your parent class' constructor in this line. super(Player, self).__init__(name,**kwargs) so no need to do this. just remove this line. self.name = name tbh, I don't know why it's happening as I am not that *very* knowledgeable about how renpy wo...
- Fri Nov 20, 2020 6:31 am
- Forum: Ren'Py Questions and Announcements
- Topic: More types of say
- Replies: 10
- Views: 682
Re: More types of say
I think you can simply do this without changing anything under the say screen, and just doing this... define yell = dict( who_color="#f00", who_font="some_font.ttf", # what_color="#0f0" # you can also pass styles for the what statement, just prefix whatever you want to pass with who/what/window ) l...
- Wed Nov 11, 2020 7:46 am
- Forum: Ren'Py Questions and Announcements
- Topic: Strange behaviour of if
- Replies: 2
- Views: 290
Re: Strange behaviour of if
Your conditions are wrong, use if tClockVal == 1 or tClockVal == 7 or ...: or if tClockVal in [1,7,13,19,20,21,25,26,28]: P.S.: reason why condition is wrong is: if tClockVal == 1 or 7: works next way: - check if tClockVal equal to 1 - if not then check if 7 is truthy, which is always So your condi...
- Wed Nov 11, 2020 6:48 am
- Forum: Ren'Py Questions and Announcements
- Topic: Strange behaviour of if
- Replies: 2
- Views: 290
Strange behaviour of if
Hi there, I've been struggling with some easy things for two hours and for the life of me, I can't find what I have done wrong. Maybe I'm just stupid. If one of you sees the error please tell me cuz I can't find it. label home_front: $currentLocation = "home_front" $tClockVal = 0 if scheduleId == 1:...
- Thu Oct 22, 2020 10:58 am
- Forum: Ren'Py Questions and Announcements
- Topic: More types of say
- Replies: 10
- Views: 682
Re: More types of say
do you mean the two different text sizes in one dialogue screen? use text tags npc "{size=30}This is size 30 text, {/size} and this is {size=50}size 50{/size} text." To have it as you've displayed there, something like this should work. (numbers made up, adjust as necessary) npc "{size=20}\"Yelling...
- Thu Oct 22, 2020 10:53 am
- Forum: Ren'Py Questions and Announcements
- Topic: More types of say
- Replies: 10
- Views: 682
Re: More types of say
well, it's getting a bit complicated what you want, but i can suggest a workaround, though not really sure if it is the best way, but it works. first is to remove the *emo in your code. then replace the condition within the say screen as something like... $ emo = _last_say_kwargs.get("emo") # emo s...