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

Topics - dpro_games

#1
Development / Strange problem with a "set_enabled()"
January 15, 2020, 09:39:33 PM
Hello ! I have a strange problem with my code. I want to enable my custom entitiy "light" after a timer, it works but I have an error message in the consol... I really don't understand what this is about

Here's the code :
local map = ...
local game = map:get_game()


-- Explode the door and Kimos enter the room
local function animation()
  sol.timer.start(4000, function()
    map:create_explosion({
      name = "ex",
      layer = 2,
      x = 160,
      y = 208})
    sol.audio.play_sound("explosion")
    light_door:set_enabled(true)
    door:set_enabled(false)
  end)
end


-- Event called at initialization time, as soon as this map is loaded.
function map:on_started()
  game:set_value("dark_room",true)
  light_door:set_enabled(false)

  game:set_hud_enabled(false)
  game:set_pause_allowed(false)
  hero:set_visible(false)
  animation()
end


And here's the error message :

Error: In on_enabled: scripts/multi_events.lua:41: attempt to call upvalue 'callback' (a boolean value)
stack traceback:
[C]: in function 'callback'
scripts/multi_events.lua:41: in function 'previous_callbacks'
scripts/multi_events.lua:41: in function <scripts/multi_events.lua:40>
[C]: in function 'set_enabled'
maps/cutscenes/intro_1.lua:14: in function <maps/cutscenes/intro_1.lua:7>


I know how to read error message but I don't understand why this happen only with my custom entity.. No probleme with the door:set_enabled(false)

Thank you
#2
Hello, I am searching where is the pause menu started in the scripts files of XD2 and how to launch it by myself ?
I'm currently trying to use the pause menu of XD2 with the some of the scripts of "Le defi de Zeldo". So I replaced the files for the menu and now, when I'm pausing the game, the game is paused but no menu are opening... Where do I need to say to the game where starting the pause menu ?

Thanks
#3
Development / Error 1.5 -> 1.6
December 27, 2018, 12:18:15 PM
Hello, I have error since I updated my quest to 1.6... I don't know why, maybe some function has changed ? What I need to do

Error: bad argument #1 to sol.timer.start (game, item, map, entity, menu or sol.main expected, got table), will use a default context instead
stack traceback:
[C]: at 0x017e4540
[C]: in function 'start'
scripts/hud/hearts.lua:93: in function 'check'
scripts/hud/hearts.lua:158: in function 'new'
scripts/menus/savegames.lua:347: in function 'read_savegames'
scripts/menus/savegames.lua:51: in function <scripts/menus/savegames.lua:9>
[C]: in function 'start'
main.lua:53: in function <main.lua:50>
[C]: in function 'stop'
scripts/menus/title.lua:345: in function 'skip_menu'
scripts/menus/title.lua:218: in function <scripts/menus/title.lua:217>
(Thread 0xefc01c0)


Thank for the help
#4
Development / solarus-run.exe icon
March 07, 2018, 08:19:01 PM
Hello, I don't know how to change the .exe icon. I have already done the pics with all the needed size but I don't know how to set it to the .exe which launch the game directly.
Thank to help me  :)
#5
Development / Convert US colour to PAL
February 20, 2018, 11:45:02 AM
Hello I'm using a Pal version of the big Hyrule tileset availible on the forum, but the entities are still in the US colour, how can I fix that ?

Thank you
#6
Development / Compile for RETROPIE ?
January 09, 2018, 08:09:21 PM
Hello there,
I have already all setup on my raspberry pi 3 to create a solarus console with retropie. All work, I mean there are the main project which work pretty well. As mentioned here https://github.com/RetroPie/RetroPie-Setup/wiki/Solarus I can add my own game. BUT, how can I do that? I developed my game on windows with solarus 1.5.3. I have my "data.solarus" and now... What do I am supposed to do with all this?

Thanks for your help!  :)
#7
Development / Save file ?
November 24, 2017, 09:09:30 AM
Hello, I working on a project with the solarus engine in my school but I can run the quest. I think the probleme come from the save file which cannot be created because of my "student session" can't write on the local disk but only on a serveur. So, how can I change the path to say to solarus than it need to create the file on the serveur and load the save from it ?

Thank you to help me  :)
#8
Hello, I create this code to increment a value when this chest is open but I have this error :
Error: Failed to load script 'maps/dungeons/tuto/place_holder': [string "maps/dungeons/tuto/place_holder.lua"]:5: <name> or '...' expected near '"sword"'

function sword_chest:on_opened("sword", 1, "sword_chest_save")
  hero:unfreeze()
  chest_open = chest_open + 1
  test()
end
#9
Development / In trouble with pause menu
June 29, 2017, 11:21:29 PM
Hello, i'm using the exact same code as the christopho's project (mecuris chest) for the pause menu and the game over menu...
(pause.lua/pause_inventory.lua/pause_map.lua/pause_options.lua/pause_quest_status.lua/pause_submenu.lua/game_over.lua)
https://github.com/solarus-games/zelda-mercuris-chest/tree/dev/data/scripts/menus
But there is a strange bug when the player die... the game over menu work very well but if the player choose to continue the game (with save or without save...) when the pause button is pressed during the game after the choice, the menu is completely broken... the images are superimposed on the others ect... I don't know why. But when we quit the game and restart the save all is back as before...

Please help me ! Thank
#10
Development / Small Key HUD ?
April 04, 2017, 09:05:39 PM
Hello, I followed Christopho's tuto and I don't understand how to display a small key counter...

The small_key item:

local item = ...
local game = item:get_game()

--small_key option
function item:on_created()
  self:set_shadow("small")
  self:set_can_disappear(false)
  self:set_brandish_when_picked(true)
  self:set_sound_when_picked("picked_small_key")
  item:set_amount_savegame_variable("small_keys_save")
end

--small_key save
function item:on_obtaining()
  item:add_amount(1)
end


Thank you for helping me !
#11
I have a problem to initialize the "small_key" save. :-\

I want to create a door in a dongeon which can be open with a small key but solarus display an error in the consol...I still read the documentation but i don't understand how can I do to solarus doesn't display that: : Error: In create_door: bad argument #1 to ? (Bad field 'opening_condition' (equipment item 'small_key' is not saved)).
:'( Thank to help me !!!

Sorry for the bad translation, I'm french...