Well, I have a problem here.
What I want to do is to create a button that will change the position of a sprite.
But I want to place the sprite in a viewport which is I don't know how
Is there any way for renpy.show or the show statement to show an image displayable on a viewport based on an offset?
(I want the viewport to be dynamic based on my choise selected)
What I want to make is a simple grid based SRPG where the animated sprite will move around in the viewport (like disgaea and such)
Can anyone help me?
does anyone know how to show a displayable in a viewport
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.
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.
- saguaro
- Miko-Class Veteran
- Posts: 560
- Joined: Sun Feb 12, 2012 9:17 am
- Completed: Locked-In, Sunrise, The Censor
- Organization: Lucky Special Games
- itch: saguarofoo
- Location: USA
- Contact:
Re: does anyone know how to show a displayable in a viewport
You would include a displayable by using Add
http://www.renpy.org/doc/html/screens.html#add
Add can take transform properties like xoffset and yoffset, so you could have something like
Within the viewport and you could update the position variables as needed and the image position will change.
http://www.renpy.org/doc/html/screens.html#add
Add can take transform properties like xoffset and yoffset, so you could have something like
Code: Select all
add "my_sprite.png" xoffset sprite_xoffset yoffset sprite_yoffset
Re: does anyone know how to show a displayable in a viewport
Wow thanks, that solved the problem nowsaguaro wrote:You would include a displayable by using Add
http://www.renpy.org/doc/html/screens.html#add
Add can take transform properties like xoffset and yoffset, so you could have something likeWithin the viewport and you could update the position variables as needed and the image position will change.Code: Select all
add "my_sprite.png" xoffset sprite_xoffset yoffset sprite_yoffset
and now another problem has come out
how can I center the position of the viewport over a certain point automaticly (not manually scroll them)
Who is online
Users browsing this forum: zyric