Search found 2521 matches

by Alex
Fri Jul 03, 2020 3:09 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How do you get the attribute (?) of an item?
Replies: 10
Views: 352

Re: How do you get the attribute (?) of an item?

... How do I construct a conditional that’ll read the contents of an item? ... What your Item class attributes are? Is it looks like class Item(name, fruit): If so, you could make a list of instanses of Item class, like $ my_bag = [apple, egg, egg, apple, apple] and then iterate through it in a scr...
by Alex
Thu Jul 02, 2020 1:21 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding delay between displayables in a screen
Replies: 8
Views: 606

Re: Adding delay between displayables in a screen

You could make a variable to check if buttons should be shown or not, and a timer that will set the proper value to this variable. Try screen test_scr(): default flag_var = False # default value of screen variable add 'ships_log_opening_anim_1' # show your animation if not flag_var: timer 5.0 action...
by Alex
Tue Jun 30, 2020 6:27 am
Forum: Ren'Py Questions and Announcements
Topic: (SOLVED)Image changing height among changing x position, help?
Replies: 7
Views: 360

Re: Image changing height among changing x position, help?

...I will be using this character a lot with other characters on the screen, so I'd like to be able to show him at other positions without having to declare zoom every time he's stated to be shown with another character. ... Hm, correct me if don't get it right (again): - if you've declared 'elias ...
by Alex
Mon Jun 29, 2020 2:59 pm
Forum: Ren'Py Questions and Announcements
Topic: (SOLVED)Image changing height among changing x position, help?
Replies: 7
Views: 360

Re: Image changing height among changing x position, help?

The zoom is part of the sprite size, that I've adjusted in-game. ... You can't redefine your image midgame - Ren'Py searches for all image declarations and run them before the game starts. You could either apply zoom property to the image directly when you show it, or made a set of transforms with ...
by Alex
Fri Jun 26, 2020 5:25 pm
Forum: Ren'Py Questions and Announcements
Topic: Add a displayable to an existing screen
Replies: 5
Views: 468

Re: Add a displayable to an existing screen

drmindflip wrote:
Thu Jun 25, 2020 5:19 pm
...I have one more question that has been driving me crazy...how can I apply a transform to these imagebuttons when they are first generated only. ...
The example on the link has a transform, so try to make the same and play with 'on appear'/'on show' events.
by Alex
Wed Jun 24, 2020 7:40 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Why my game doesn't work when I save/load it ?
Replies: 11
Views: 809

Re: Why my game doesn't work when I save/load it ?

... Can you show me a quick example ? ... The idea is to make screens return some values instead of running functions. When in a loop you could evaluate those values to run some functions / show screens in separate lines of code. This should make game be savable. mock-up sample label loop: show scr...
by Alex
Tue Jun 23, 2020 2:06 pm
Forum: Ren'Py Questions and Announcements
Topic: Add a displayable to an existing screen
Replies: 5
Views: 468

Re: Add a displayable to an existing screen

... It would be lovely if I could use regular Renpy commands to show these tabs with little transitions, animations etc. I suppose I could dynamically make each tab a little independent 'screen' of its own, showing a single imagebutton, or is that a crazy idea? You can make several screens (if all ...
by Alex
Tue Jun 23, 2020 12:32 pm
Forum: Ren'Py Questions and Announcements
Topic: Add a displayable to an existing screen
Replies: 5
Views: 468

Re: Add a displayable to an existing screen

That denends of what you want to show. The easiest (but maybe not the most efficient) way is to put all the elements in your screen and make some variables to operate what to show and what not. But if you have a list of elements to show (like some player stats), you can show the content of this list...
by Alex
Tue Jun 23, 2020 11:52 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Why my game doesn't work when I save/load it ?
Replies: 11
Views: 809

Re: Why my game doesn't work when I save/load it ?

Try to add a text line before showing your game screens and check if it will change the behaviour of your game (likely it won't). label start: "..." show screen village_screen show screen debug_screen show screen modal_screen Try to redesign your code, like make a game loop in a label (not inside a ...
by Alex
Sun Jun 21, 2020 7:10 am
Forum: Ren'Py Questions and Announcements
Topic: How to change mouse right click fuction?
Replies: 6
Views: 294

Re: How to change mouse right click fuction?

... For some reason it not working anymore after I custom some other screen. ... Try to set it back to 'save' screen to test if it working at all. If it will show you the save screen then check what you've changed in your 'game_menu' screen. If not - check the changes you've made in game menu scree...
by Alex
Sat Jun 20, 2020 10:31 am
Forum: Ren'Py Questions and Announcements
Topic: How to make all images have their y-aligned higher?
Replies: 1
Views: 248

Re: How to make all images have their y-aligned higher?

When you write show char at left 'left' (and all the others) are a transforms, so you can re-define them in your script # These are positions that can be used inside at clauses. We set # them up here so that they can be used throughout the program. transform left: xpos 0.0 xanchor 0.0 ypos 1.0 yanch...
by Alex
Fri Jun 19, 2020 1:08 pm
Forum: Ren'Py Questions and Announcements
Topic: How to change mouse right click fuction?
Replies: 6
Views: 294

Re: How to change mouse right click fuction?

Just set _game_menu_screen variable to desirable screen name (like 'game_menu').

Code: Select all

label start:
    $ _game_menu_screen = 'game_menu'
https://www.renpy.org/doc/html/store_va ... enu_screen
by Alex
Wed Jun 17, 2020 12:02 pm
Forum: Ren'Py Questions and Announcements
Topic: What's wrong with my python loop?
Replies: 5
Views: 247

Re: What's wrong with my python loop?

OrsonDeWitt wrote:
Wed Jun 17, 2020 5:13 am
So I have a variable X
in screen say(who, what) I have an hbox with the following:

Code: Select all

python:
      while X > 100:
            X = 100
...
What's the goal and how the actual code of say screen looks like?
This might be that you need to re-code this part.
by Alex
Wed Jun 17, 2020 6:35 am
Forum: Ren'Py Questions and Announcements
Topic: Save/Load screen (Page number can go past set amount of pages)
Replies: 11
Views: 973

Re: Save/Load screen (Page number can go past set amount of pages)

... So, you want to limit the inventory capasity? Then try my original code and class Inventory(store.object): def __init__(self, money=0): self.currentItem = None self.money = money self.items = [] def add(self, item): # a simple method that adds an item; we could also add conditions here (like ch...