Page 1 of 1
At fade causes AttributeError?
Posted: Tue Aug 05, 2014 12:15 pm
by netravelr
Hey guys,
So I had a piece of code that worked on an earlier version of renpy;
Code: Select all
vbox:
xoffset -544
at fade
spacing 10
$ x = 0;
# buttons, etc.
But now, fade is no longer part of the engine I guess?
I tried adding it back in:
Code: Select all
transform fade:
alpha 0
linear .15 alpha 1
But so far no good.
I liked the effect, so I'm hoping I can get it back without reverting to an older version.
Cheers!
Re: At fade causes AttributeError?
Posted: Tue Aug 05, 2014 2:52 pm
by xela
This should work...
It's a long shot but you could try renaming fade, maybe there is a conflict somewhere.
Re: At fade causes AttributeError?
Posted: Wed Aug 06, 2014 9:06 am
by PyTom
This doesn't make a ton of sense. Fade is a transition, and at takes a transform. What are you trying to accomplish?
Re: At fade causes AttributeError?
Posted: Wed Aug 06, 2014 3:18 pm
by netravelr
xela wrote:This should work...
It's a long shot but you could try renaming fade, maybe there is a conflict somewhere.
It should work, because it did before; but upon updating my RenPy I've had a number of issues come up
PyTom wrote:This doesn't make a ton of sense. Fade is a transition, and at takes a transform. What are you trying to accomplish?
I have a menu that I want to have the objects that the player can select (like buttons) fade in. In addtion, the objects are also going to be moving by a parent object which will be using another transform. Above was just a simple example, the actual code I'm using is a little more complex
Code: Select all
vbox:
xoffset -544
at fade
spacing 10
$ x = 0;
$ tempIngredients = [];
$ tempIngredients = getInvList(type)
$ ySize = max(3, int(len(tempIngredients)/4))
for i in range(x,ySize):
$ y = 0
hbox:
spacing 10
for j in range(y,4):
if(len(tempIngredients) > 0):
frame:
xpadding 0
ypadding 0
xminimum 128
yminimum 128
xmaximum 128
ymaximum 128
background None
$ element = tempIngredients.pop();
$ pathToType = "ingredients/"+ element.recipeType +"/"+(element.name).lower()+".png"
add pathToType:
zoom 1.0
xalign .5
yalign .5
else:
add "gui/inventoryitem_unused.png"
Re: At fade causes AttributeError?
Posted: Wed Aug 06, 2014 3:30 pm
by xela
* What attribute is missing, you've mentioned an error? This is working for me at the last release and PyTom is right (by default Ren'Py is trying to assign transition to fade), you should rename the transform (like fade_in(t) is what I named this in my game so it can be reused at different intervals) or at least push it to init 9999.
Re: At fade causes AttributeError?
Posted: Wed Aug 06, 2014 9:32 pm
by netravelr
Hmmm, I just removed it for the time being; but I'll take a look and see if I can get that to work later on. Thanks!