I did notice, however, that when it enters the game when I try to leave the music room, it returns me to the music room once I've done a loop through the game. Then, when I click return in the music room, it returns me to the main menu.
Main script, with images and dialouge
Code: Select all
init:
# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image kiss = "kiss.jpg"
image cafe = "cafe.jpg"
image bedroom = "bedroom.jpg"
image black = "black.JPG"
image k1 = "k1.png"
image k2 = "k2.png"
image k3 = "k3.png"
image k4 = "k4.png"
image k5 = "k5.png"
image kmad = "kaylamad.png"
image kwait = "kaylawaitanger.png"
image kpoint = "kaylapointmad.png"
image kgive = "kaylagiveup.png"
image mroom = "mroom.jpg"
image asmile = "asmile.png"
image alean = "alean.png"
# Declare characters used by this game.
$ t = Character('Takeya', color="#c8ffc8")
$ k = Character('Kayla', color="#009909")
$ m = Character('Mitsune', color="#009909")
$ a = Character('Ashley', color="#009909")
$ d = Character('Drake', color="#009909")
$ w = Character('Female Voice', color='#009909')
image splash = "splash.png"
label splashscreen:
$ renpy.pause(0)
scene black
with Pause(0.5)
show splash
with dissolve
with Pause(2.0)
scene black
with dissolve
with Pause(1.0)
return
# The game starts here.
label start:
label lovepoint:
$ kaylalove = 0
$ mitsunelove = 0
$ ashleylove = 0
scene kiss
play music "lonesomenightsrevised.mp3"
$ renpy.pause()
"meh"
"meh"
"meh"
"meh"
"meh"
"meh"
"meh"
scene black
show k1
with dissolve
"meh"
scene black
show k2
with dissolve
"meh"
scene black
show k3
with dissolve
"meh"
scene black
show k4
with dissolve
"meh"
scene black
show k5
with dissolve
"meh"
$ renpy.pause()
scene black
menu:
k "meh"
"Yeah...":
t "Yeah..."
$ kaylalove += 1
jump kgr1
"...":
t "..."
$ kaylalove -= 1
jump kbr1
label kgr1:
scene cafe
show kmad
with dissolve
k "meh"
k "meh"
k "meh"
jump cont1
label kbr1:
scene cafe
show kpoint
with dissolve
k "meh"
k "meh"
menu:
"meh":
t "meh"
$ kaylalove += 0
jump kgr2
"meh":
t "meh"
$ kaylalove -= 1
jump kbr2
label kgr2:
scene cafe
show kwait
with dissolve
k "meh"
return
label kbr2:
scene cafe
show kgive
with dissolve
k "meh"
hide kgive
with dissolve
t "meh"
"meh"
w "meh"
"meh"
show asmile
with dissolve
a "meh"
#######################################Ending Possibilities############################################
label cont1:
if kaylalove >= 1:
jump GoodEnd
else:
jump BadEnd
label BadEnd:
if kaylalove <= -1:
jump WorstEnd
else:
"meh"
return
label GoodEnd:
"meh"
return
label WorstEnd:
"meh"
#########################Music Room#########################
init python:
def set_playing_(track):
store.playing = track
return True
set_playing = renpy.curry(set_playing_)
# Call this with a button name and a track to define a music
# button.
def music_button(name, track):
if store.playing == track:
role = "selected_"
else:
role = ""
if not renpy.seen_audio(track):
name = "???"
clicked = None
else:
clicked = set_playing(track)
ui.textbutton(
name,
clicked=clicked,
role=role,
size_group="music")
# Add to the main menu.
config.main_menu.insert(3, ("Music Room", "music_room", "True"))
label music_room:
scene mroom
python:
_game_menu_screen = None
# The default track of music.
playing = "walkmypath.mp3"
label music_room_loop:
# Play the playing music, if it changed.
python:
renpy.music.play(playing, if_changed=True, fadeout=1)
# Display the various music buttons.
ui.vbox(xalign=0.5, ypos=100)
music_button("Walking My Path", "walkmypath.mp3")
music_button("A New Beginning", "newbeginning.mp3")
music_button("Lonesome Nights", "lonesomenights.mp3")
music_button("Lonesome Nights Revised", "lonesomenightsrevised.mp3")
music_button("Morning Stroll", "morningstroll.mp3")
music_button("Afternoon Love", "afternoonlove.mp3")
ui.close()
# This is how we return to the main menu.
ui.textbutton(
"Return",
clicked=ui.returns(False),
xalign=0.5,
ypos=450,
size_group="music")
if ui.interact():
jump music_room_loop
else:
return
Main menu script:
Code: Select all
label main_menu:
$ ui.add(renpy.Keymap(toggle_fullscreen = renpy.toggle_fullscreen))
$ ui.window(style='mm_root', background='menu.jpg')
$ ui.button(clicked=ui.jumpsoutofcontext('start'), background='startgame.png',hover_background='startgameh.png',xpos=322,ypos=172,xminimum=220,yminimum=62 )
$ ui.text('Start Game',hover_color='#0000',color='#0000',size=22,font='DejaVuSans.ttf')
$ ui.button(clicked=_intra_jumps('load_screen', 'main_game_transition'), background='loadgame.png', hover_background='loadgameh.png', xpos=312, ypos=232,xminimum=260,yminimum=50)
$ ui.text('Continue',hover_color='#0000',color='#0000',size=22,font='DejaVuSans.ttf')
$ ui.button( clicked=_intra_jumps('preferences_screen','main_game_transition'), background='options.png', hover_background='optionsh.png', xpos=349, ypos=288,xminimum=170,yminimum=50)
$ ui.text('Preferences',hover_color='#0000',color='#0000',size=22,font='DejaVuSans.ttf')
$ ui.button( clicked=ui.jumps('_quit'), background='quit.png', hover_background='quith.png', xpos=382, ypos=390,xminimum=100,yminimum=41)
$ ui.text('Quit',hover_color='#0000',color='#0000',size=22,font='DejaVuSans.ttf')
$ ui.button( clicked=ui.jumps('music_room'), background='musicroom.png', hover_background='musicroomh.png', xpos=307, ypos=342,xminimum=220,yminimum=50)
$ ui.text('Quit',hover_color='#0000',color='#0000',size=22,font='DejaVuSans.ttf')
$ ui.interact(suppress_overlay=True, suppress_underlay=True, mouse='mainmenu')
Would you like the options? I've only changed the background image and music playing for it, however.