Search found 8 matches

by renpynoob
Wed Oct 25, 2023 5:42 am
Forum: Ren'Py Questions and Announcements
Topic: Autostart music when the game is loaded (web build)
Replies: 4
Views: 1805

Re: Autostart music when the game is loaded (web build)

Due to limitations in the browser intended to stop advertisements from playing audio, sound and music files won't play until the user clicks inside the game at least once. https://www.renpy.org/doc/html/web.html Hint: You could create a splashscreen that forces the user to click to continue before ...
by renpynoob
Sat Sep 23, 2023 2:15 pm
Forum: Ren'Py Questions and Announcements
Topic: Autostart music when the game is loaded (web build)
Replies: 4
Views: 1805

Autostart music when the game is loaded (web build)

How can I make music start automatically after loading?

Currently, the music only starts after any user click.

I've added

Code: Select all

define config.main_menu_music = "audio/menu.mp3"
to options.rpy and the music auto starts on PC, but that doesn't work for a web build.
by renpynoob
Sat Sep 23, 2023 12:04 pm
Forum: Creator Discussion
Topic: Autostart music when the game is loaded (web build)
Replies: 0
Views: 8930

Autostart music when the game is loaded (web build)

How can I make music start automatically after loading?

Currently, the music only starts after any user click.

I've added

Code: Select all

define config.main_menu_music = "audio/menu.mp3"
to options.rpy and the music auto starts on PC, but that doesn't work for a web build.
by renpynoob
Sat Dec 03, 2022 2:06 am
Forum: Ren'Py Questions and Announcements
Topic: Pass a parameter to a renpy's Web version game? Get, store, use
Replies: 8
Views: 2419

Re: Pass a parameter to a renpy's Web version game? Get, store, use

Thank you very much drKlauz, span4ev and PyTom for your help and explanations!
Will try to implement this :)
by renpynoob
Thu Dec 01, 2022 11:33 am
Forum: Ren'Py Questions and Announcements
Topic: Pass a parameter to a renpy's Web version game? Get, store, use
Replies: 8
Views: 2419

Re: Pass a parameter to a renpy's Web version game? Get, store, use

This worked locally with RenPy 7.5.2 and Chrome. It is hacky and will need testing with actual game on live server to be sure. define game_url=__import__("emscripten").run_script_string("document.URL") if renpy.emscripten else None I don't understand what this code is doing and ...
by renpynoob
Thu Dec 01, 2022 5:45 am
Forum: Ren'Py Questions and Announcements
Topic: Pass a parameter to a renpy's Web version game? Get, store, use
Replies: 8
Views: 2419

Re: Pass a parameter to a renpy's Web version game? Get, store, use

If I understand you correctly, you need HTTP requests? Thanks for the reply. More likely I need to solve a less difficult task: I need to read parameters from GET request I got. When someone starts my game using url https://domain.com/game/index.html ?param1=var1&param2=var2 I need to get and u...
by renpynoob
Wed Nov 30, 2022 4:30 am
Forum: Ren'Py Questions and Announcements
Topic: Pass a parameter to a renpy's Web version game? Get, store, use
Replies: 8
Views: 2419

Pass a parameter to a renpy's Web version game? Get, store, use

Hello! How to pass a parameter to a renpy web version game, read it and use it inside the game? Is there a way to read parameters from initializing url? Let's start the game from url yourserver.com/yourgame/index.html? name1 =FirstCharacter& name2 =SecondCharacter I need to: 1. get those name1 a...