Search found 9 matches

by Lucyper
Sun Apr 28, 2024 12:28 pm
Forum: Ren'Py Questions and Announcements
Topic: CDD Parallax Effect w/ Smoothness
Replies: 2
Views: 152

Re: CDD Parallax Effect w/ Smoothness

I usually get smooth movement by having variables like `x_target` and add to `x` a small amount till it reaches that target. But I'm sure there are better ways to larp between those values. I want to thank you! I manage to make the movement smooth while increasing and decreasing, I'm pretty sure I ...
by Lucyper
Sat Apr 27, 2024 5:17 pm
Forum: Ren'Py Questions and Announcements
Topic: CDD Parallax Effect w/ Smoothness
Replies: 2
Views: 152

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: 393

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: 393

[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: 438

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: 438

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: 438

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: 438

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: 438

[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...