[solved] apply default offset to all objects within a layer?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
SONTSE
Regular
Posts: 95
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 8 VN's so far
Contact:

[solved] apply default offset to all objects within a layer?

#1 Post by SONTSE » Sun Jan 18, 2015 4:55 pm

Yo!
i need an offset so the point pos (0,0) or align (0,0) will be moved from top-left corner to somewhere on the middle. that would be very handy porting some game. thanks!
Last edited by SONTSE on Sun Jan 18, 2015 5:47 pm, edited 1 time in total.
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: can i apply default offset to all objects within a layer

#2 Post by xela » Sun Jan 18, 2015 5:08 pm

1) Prolly depends on how the objects are displayed. You could iterate of the list of displayable/widgets and do weird stuff to them :)

2) Is that not the same as repositioning the layer? I believe that I've read that transforms can be applied to all displayable shown on any specific layer, that might be worth of trying out.
Like what we're doing? Support us at:
Image

User avatar
SONTSE
Regular
Posts: 95
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 8 VN's so far
Contact:

Re: can i apply default offset to all objects within a layer

#3 Post by SONTSE » Sun Jan 18, 2015 5:46 pm

xela wrote: I believe that I've read that transforms can be applied to all displayable shown on any specific layer
Thanks for a brilliant hint, xela n__n.
That reminded me i saw something like this somewhere too.
...and this was in "Tutorial" game. Silly me ^^'''''''''

so my solution comes to:

Code: Select all

show layer master:
    offset (100,100)
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]