[Solved] Video positioning
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.
[Solved] Video positioning
I defined an .webm file as an image and resized it. Now I want to make it appear somewhere in the screen using "show image", but it seems "image my_image does not accept position attributes". Is there a way to do it without setting up a new scene?
Last edited by Doeny on Thu Oct 06, 2022 6:36 pm, edited 2 times in total.
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: Video positioning
The properties parameter here is probably the one you're looking for.https://www.renpy.org/doc/html/movie.html#Movie wrote: Movie(fps=24, size=None, channel=u'movie', play=None, mask=None, mask_channel=None, image=None, play_callback=None, side_mask=False, loop=True, start_image=None, **properties)
Code: Select all
image my_image = Movie(..., align=(0.5, 0.5)) # places the movie at the center
Code: Select all
image my_image = Movie(...)
label start:
show my_image:
align (0.5, 0.5)
Code: Select all
image my_image = Transform(Movie(...), align=(0.5, 0.5))
label start:
show my_image
Code: Select all
transform my_trans():
align (0.5, 0.5)
image my_image = Movie(...)
label start:
show my_image at my_trans
Re: Video positioning
For some reason I'm getting an "expected 'image_name_component' not found" error. No idea what it means or is caused by.enaielei wrote: ↑Mon Oct 03, 2022 9:46 pmThe properties parameter here is probably the one you're looking for.https://www.renpy.org/doc/html/movie.html#Movie wrote: Movie(fps=24, size=None, channel=u'movie', play=None, mask=None, mask_channel=None, image=None, play_callback=None, side_mask=False, loop=True, start_image=None, **properties)Another ways...Code: Select all
image my_image = Movie(..., align=(0.5, 0.5)) # places the movie at the center
Code: Select all
image my_image = Movie(...) label start: show my_image: align (0.5, 0.5)
Code: Select all
image my_image = Transform(Movie(...), align=(0.5, 0.5)) label start: show my_image
Code: Select all
transform my_trans(): align (0.5, 0.5) image my_image = Movie(...) label start: show my_image at my_trans
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: Video positioning
Maybe try avoiding using the "image" word itself in naming your image.
You can also post here your full traceback.
You can also post here your full traceback.
Re: Video positioning
So here's that part of the code:
Code: Select all
label unit_1_deploy:
$ unit_1_deployed = True
if selected_tile == 1:
$ tile_1 = True
show "unit_chara"
hide screen unit_list
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/field.rpy", line 171: expected 'image_name_component' not found.
show "unit_chara"
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: Video positioning
If you'll see the "show" example in my code, there are no quotes there.
Who is online
Users browsing this forum: Google [Bot]