- Sign up for mailing list
- Return quickly to main menu
- Automatically lunch trailer after 2 minutes of activity in the main menu
Sign up for mailing list
Put this code at this end of your demo to retrieve mail in a .txt document (so it works even if internet is bad or not working). Make sure to be perfectly clear about what the mail will be used for. (The screen automatically goes back to main menu if nothing is done during 2 minutes)
1 - At your end of your demo add this lines:
Code: Select all
call screen sdemo_end()
return
3 - Create a mail_list.txt document in your game folder.
Return to main menu
Some people will leave the computer without finishing the demo, to save time, set up a key touch to get back quickly on main menu for your next player.
1 - Create a screen with a key returning to the main menu, you can put it anywhere.
Code: Select all
screen keys():
key "x" action MainMenu(confirm=False)
2 - At the begining of your script call the key screen:
Code: Select all
label start:
show screen keys()
Code: Select all
screen yourscreen():
use keys()
Automatically lunch the trailer
After two minutes of inactivity in the main menu, the game will play your trailer in loop (because movies attract more the attention of potential player).
1 - Add your trailer in your gui folder, make sure the video is in webm format and is named "trailer" (or change the path accordingly in step two.)
2 - Add anywhere (I put it just before the menu screen) this code:
Code: Select all
image movie = Movie(play="gui/trailer.webm")
label show_trailer:
show screen key_trailer()
show movie
pause
return
#Allow you to stop the movie by clicking on x, on the space bar and on enter
screen key_trailer():
key "x" action Return()
key "K_RETURN" action Return()
key "K_SPACE" action Return()
Code: Select all
timer 120 action Start('show_trailer')
Hope it will be useful to someone!