Search found 391 matches

by _ticlock_
Sun Oct 30, 2022 12:28 pm
Forum: Ren'Py Questions and Announcements
Topic: Wardrobe problems
Replies: 2
Views: 69

Re: Wardrobe problems

hotspot(1580, 210, 175, 120) action If(chara+"_eyes" > 1, SetVariable(chara+"_eyes", chara+"_eyes" - 1), SetVariable(chara+"_eyes", 1)) hotspot(1755, 210, 175, 120) action If(chara+"_eyes" < chara+"_eyes_max", SetVariable(chara+"_eyes", chara+"_eyes" + 1), SetVariable(chara+"_eyes", chara+"_eyes_ma...
by _ticlock_
Sat Oct 29, 2022 10:44 am
Forum: Ren'Py Questions and Announcements
Topic: Can I return the width of an image?
Replies: 8
Views: 2269

Re: Can I return the width of an image?

I still haven't found an answer. Can anyone help? It likely shows the wrong size because you put 0,0 as width and height in the render. You can try the following: init python: def get_size(displayable): w, h = renpy.render(displayable, config.screen_width, config.screen_height, 0, 0).get_size() ret...
by _ticlock_
Fri Oct 28, 2022 4:18 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] TypeError: iter() returned non-iterator of type 'RevertableList'
Replies: 5
Views: 104

Re: TypeError: iter() returned non-iterator of type 'RevertableList'

However, when I change __iter__ and __call__ to return self rather than self.team, the error updates to "iter() returned non-iterator type Party" 1) Not sure why. It seems like it does not see the __next__ method in the class Party . Check the indentation. Works for this little test: init python: c...
by _ticlock_
Thu Oct 27, 2022 11:57 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] TypeError: iter() returned non-iterator of type 'RevertableList'
Replies: 5
Views: 104

Re: TypeError: iter() returned non-iterator of type 'RevertableList'

I'm trying to make a class that can be iterated over like a list, but I'm not sure how to properly implement __iter__ and __next__. However, when I try to run it, I get the error message in the title. From my understanding, RevertableList is a special Ren'Py list that works with rollback, but still...
by _ticlock_
Thu Oct 27, 2022 12:08 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Why does 'background' in the condition disable 'hover_background'?
Replies: 2
Views: 100

Re: Why does 'background' in the condition disable 'hover_background'?

I understand that I can explicitly specify hover_background. But I want to understand the principle of this problem and, if possible, put all the styles in style blocks instead of specifying them in the loop body Setting the background property sets the idle_background and hover_background properti...
by _ticlock_
Tue Oct 25, 2022 11:45 am
Forum: Ren'Py Questions and Announcements
Topic: Conditional Menu Options?
Replies: 5
Views: 124

Re: Conditional Menu Options?

Oh! I set the labels to False at the beginning of my code (after the label start line of code) to keep things organized. So the values technically exist as such-- But it's just not reading it for some reason? At least, that's what I'm seeing. (Sorry for not putting this in the main post initially, ...
by _ticlock_
Tue Oct 25, 2022 11:03 am
Forum: Ren'Py Questions and Announcements
Topic: Button Response Time - Rhythm Minigame
Replies: 7
Views: 261

Re: Button Response Time - Rhythm Minigame

Ok, I think I'm already having some positive results, except for one detail in Android (especially for playing simultaneous notes). I understand that you have to capture the location of the pointers, and of course, on PC it can be obtained through renpy.get_mouse_pos() , which returns a tuple with ...
by _ticlock_
Mon Oct 24, 2022 2:43 pm
Forum: Ren'Py Questions and Announcements
Topic: Why doesn't the game save state and return to the main screen?
Replies: 6
Views: 201

Re: Why doesn't the game save state and return to the main screen?

But in practice for my master file I could not apply it. There are classes, dictionaries, lists, functions, styles. If you managed to write all the necessary logic for the game using python, I don't think it will be hard for you to write it using Renpy label flow. Maybe look at some Renpy minigame ...
by _ticlock_
Sun Oct 23, 2022 10:43 pm
Forum: Ren'Py Questions and Announcements
Topic: Why doesn't the game save state and return to the main screen?
Replies: 6
Views: 201

Re: Why doesn't the game save state and return to the main screen?

Hi. Thanks for the reply. I tried using a loop inside the label and changing the variable with each step (tried 3 options), but it doesn't work. I added this example code to my question. Based on your code, I would suggest doing the following changes: action Function -> Return(<with some useful dat...
by _ticlock_
Sat Oct 22, 2022 11:18 pm
Forum: Ren'Py Questions and Announcements
Topic: Button Response Time - Rhythm Minigame
Replies: 7
Views: 261

Re: Button Response Time - Rhythm Minigame

Part of me considered that same mechanism, but to be honest, I haven't tried it on Android. For this to work, do I need to import pygame_sdl2 before all the code, or does Ren'Py already import it every time the game starts? Ren'Py engine uses pygame, but I believe you still need to import it. Just ...
by _ticlock_
Fri Oct 21, 2022 3:54 pm
Forum: Ren'Py Questions and Announcements
Topic: Button Response Time - Rhythm Minigame
Replies: 7
Views: 261

Re: Button Response Time - Rhythm Minigame

CharlieFuu69 wrote:
Thu Oct 20, 2022 6:53 pm
I would try using CDD for that. This way you can only process click(touch) without processing other "events". If you don't want to process a long-press touch you can just use pygame.MOUSEBUTTONDOWN, which is a better estimate of player's reaction.
by _ticlock_
Thu Oct 20, 2022 11:47 am
Forum: Ren'Py Questions and Announcements
Topic: Show results after selection?
Replies: 3
Views: 180

Re: Show results after selection?

Yes, I'm looking for a code or design that shows what happens after menu selection, I hope something like this has been done before. 1) What do you expect to happen after menu selection? A fixed result, a random result from a list with weights, or other logic? Here is a simple example with a screen...
by _ticlock_
Wed Oct 19, 2022 10:13 pm
Forum: Ren'Py Questions and Announcements
Topic: HELP error in coding a journal screen
Replies: 2
Views: 137

Re: HELP error in coding a journal screen

Use modal True and Hide instead of Return(). A modal screen prevents the user from interacting with displayables below it. Return is used to return from call screen, you need to use Hide when you use show screen or Show action. screen nav_screen(): modal True add "journal.png" modal True textbutton ...
by _ticlock_
Wed Oct 19, 2022 4:25 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How to pause game while showing a screen
Replies: 2
Views: 138

Re: How to pause game while showing a screen

Hi all, I've been searching for how to do this but couldn't find anything on Google. I'd like to have everything pause while the player is on a screen. For example, when looking at the overworld map, the game will pause. Currently, the game just continues as normal, and shows dialogue/the next scen...
by _ticlock_
Wed Oct 19, 2022 1:12 pm
Forum: Ren'Py Questions and Announcements
Topic: Show results after selection?
Replies: 3
Views: 180

Re: Show results after selection?

Hello, is there a ready-made design to show the results after the selection? For example, I want to get a result like you" fell and got injured" when the character selects the option to "go to the tavern", but I don't have a sample design that I can edit. SAMPLE GAME: https://bit.ly/3glQWGD It is n...