Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - etertaycb

#1
Here is a link to the quest folder with the issue re-created

https://mega.nz/#!TCpiSabL!cXUcY3GXMEoEjLOy5F5o2crFVOkJ3y3V6DPFvw2lhJg


I've recreated the issue (bug?) in its simplest form. here are the answers to your questions

1.) 1.5.3
2.) yes, in addition i am only using the default music files in the folder "eduardo"
the song I tried to use in this example was "game_over.ogg"
3.) .ogg  (default files)
4.) yes. If I attach the same song "game_over.ogg" with the map editor the song will play

the error I receive is Error: In on_key_pressed: [string "main.lua"]:48: No such music: 'game_over

function sol.main:on_key_pressed(key, modifiers)

  local handled = false
  if key == "f5" then
    -- F5: change the video mode.
    sol.video.switch_mode()
    handled = true
  elseif key == "f11" or
    (key == "return" and (modifiers.alt or modifiers.control)) then
    -- F11 or Ctrl + return or Alt + Return: switch fullscreen.
    sol.video.set_fullscreen(not sol.video.is_fullscreen())
    handled = true
  elseif key == "f4" and modifiers.alt then
    -- Alt + F4: stop the program.
    sol.main.exit()
    handled = true
  elseif key == "escape" and sol.main.game == nil then
    -- Escape in title screens: stop the program.
    sol.main.exit()
    handled = true
-- this is where I get an issue
elseif key == "p" then
sol.audio.play_music("game_over")

  end

#2
Quote from: Diarandor on May 31, 2018, 01:48:36 PM
The error is clear: there is no file "musics/boss.ogg".

there IS a file there though. its one of the default music files and ive also tried a few others and adding my own. same result.  Even when I call the same song that is playing i get the same result
#3
Hello,  I've been playing around with solarus trying to get a feel for the engine and ive run into this error I know its probably a simple answer but for the life of me I cant seem to figure it out... here is the code..

Quoteelseif key == "p" then
sol.audio.play_sound("bush")
elseif key == "l" then
sol.audio.play_music("boss")
elseif key == "[" and sol.audio.get_music() ~= nil  then
last_playedmus = sol.audio.get_music()
sol.audio.stop_music()
elseif key == "[" and sol.audio.get_music() == nil  then
sol.audio.play_music(last_playedmus)


  end

when i launch the game and press "L" the boss music ought to play but instead the console says   "No such music: 'boss' "  the music that is set to play in the map editor works fine, but for some reason I cant get any music to play via the script.  the rest of the function works fine and playing a sound effect with a key also works fine

could I get some quick help with this? thank you!