Search found 8 matches

by Lucyper
Sat Apr 27, 2024 5:17 pm
Forum: Ren'Py Questions and Announcements
Topic: CDD Parallax Effect w/ Smoothness
Replies: 1
Views: 82

CDD Parallax Effect w/ Smoothness

I've messing with CDD's for a while and I'm trying to make a parallax effect with some sort of smoothness when you click and drag the mouse around the screen (left to right) The major problem I'm having is how to calculate and apply the smoothness to the displayable movement, I tried many different ...
by Lucyper
Sun Feb 11, 2024 9:48 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Does renpy rollback support vars() ?
Replies: 2
Views: 379

Re: Does renpy rollback support vars() ?

PyTom wrote: Sat Feb 10, 2024 11:56 pm No. Using:

Code: Select all

setattr(self, field, getattr(self, field) + num)
should work.
Thanks for the answer, I will use this alternative.
by Lucyper
Sat Feb 10, 2024 9:41 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Does renpy rollback support vars() ?
Replies: 2
Views: 379

[SOLVED]Does renpy rollback support vars() ?

I noticed that when I use the following structure: init python: class GameControl(): def __init__(self): self.day = 0 self.time = 0 def foward(self, field, num): vars(self)[field] += num default Game = GameControl() label start: $ Game.foward('day', 5) # rollback there If I do a rollback, the game k...
by Lucyper
Sun Jun 18, 2023 9:02 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Problem With Save/Load
Replies: 11
Views: 409

Re: Problem With Save/Load

Let me suggest the following: init -2 python: class Player(): def __init__(self, name): self.name=name self.inv=[] def gain(self,Item): self.inv.append(Item) #Why not add just item class Item(): def __init__(self, name, image): self.name=name self.image=image define n = Character("Eil") d...
by Lucyper
Sun Jun 18, 2023 9:01 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Problem With Save/Load
Replies: 11
Views: 409

Re: Problem With Save/Load

but, what happens if I use define in Init block? Nobody knows. That's the problem. When you do things a wrong way, sometimes there can be no visible effect. And then one day... BANG! Thanks for the advise, I already changed the code and put everything out from init block, I was following the code f...
by Lucyper
Sun Jun 18, 2023 11:20 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Problem With Save/Load
Replies: 11
Views: 409

Re: Problem With Save/Load

init : define n = Character(eil.name) define n = "Narrador" Don't put define in init block. Don't define the same name twice. Reporting errors, show the traceback message (where exactly the exception happened, with which instruction & variable). So, if I run the above code, no error o...
by Lucyper
Sun Jun 18, 2023 10:14 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Problem With Save/Load
Replies: 11
Views: 409

Re: Problem With Save/Load

init : $ eil = Player("Eil") I really don't know what to do... so any help I will be eternally grateful. :) In your case, eil is treated as a constant. You need to use default statement for variables. Check documentation for default statements and define statements . define n = Character(...
by Lucyper
Sat Jun 17, 2023 8:39 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Problem With Save/Load
Replies: 11
Views: 409

[SOLVED]Problem With Save/Load

Renpy doesn't save data after closing the game and loading a save, I'm trying to build a Clothing System based in https://lemmasoft.renai.us/forums/viewtopic.php?t=25579#p313665 and https://lemmasoft.renai.us/forums/viewtopic.php?t=30643 . That renpy cannot save objects I already know about, but all...