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 - Boydie

#1
Your projects / Re: Zelda: Book of Mudora
March 11, 2017, 11:39:35 AM
Game looks smooth, but I finished the race & I need to go talk to Rudy, but I can't find him?
#2
General discussion / Re: HUD Not showing??
March 11, 2017, 10:58:49 AM
Quote from: Christopho on March 11, 2017, 10:07:54 AM
I am just talking about basic debugging. Print stuff to know if a function is called. Then you know if the problem is that the function does not work or is never called.

Solarus is made for programmers, you don't have to know Lua but you need some programming experience. Otherwise I recommended other engines like Zelda Classic.

I know it's made for programmers man, but I want to learn, we all start out somewhere...
#3
Game art & music / Requesting
March 11, 2017, 08:13:02 AM
Hey guys, does anyone have any houses from link to the past or minish cap??
I'm after some buildings, much appreciated!!
#4
General discussion / Re: HUD Not showing??
March 11, 2017, 05:39:02 AM
Quote from: Christopho on March 10, 2017, 08:47:36 PM
It is in the code you posted. Just do a print in initialize_hud_features() to know if the function is called or not, it will help understand the problem.

I'm totally confused man, how do I fix it? ahha
#5
General discussion / Re: HUD Not showing??
March 10, 2017, 05:03:45 PM
Quote from: Christopho on March 10, 2017, 04:37:30 PM
Don't call it yourself, but check that it is called (for example with a print statement).
It is the line
Code (lua) Select
game_meta:register_event("on_started", initialize_hud_features)
that is supposed to call it when the game starts.

Where would I find that man? Sorry I'm a complete noob ahaha
#6
General discussion / Re: HUD Not showing??
March 10, 2017, 04:23:16 PM
Quote from: Christopho on March 10, 2017, 04:06:16 PM
Is there any error message?
Is initialize_hud_features() called?

How do I call it man? I'm new...

Thanks
#7
General discussion / HUD Not showing??
March 10, 2017, 03:02:24 PM
Why isn't my HUD showing??
Here's my hud.lua


-- Script that creates a head-up display for a game.

-- Usage:
-- require("scripts/hud/hud")

require("scripts/multi_events")
local hud_config = require("scripts/hud/hud_config")

-- Creates and runs a HUD for the specified game.
local function initialize_hud_features(game)

  -- Set up the HUD.
  local hud = {
    enabled = true,
    elements = {},
  }

  for _, element_config in ipairs(hud_config) do
    local element_builder = require(element_config.menu_script)
    local element = element_builder:new(game, element_config)
    if element.set_dst_position ~= nil then
      -- Compatibility with old HUD element scripts
      -- whose new() method don't take a config parameter.
      element:set_dst_position(element_config.x, element_config.y)
    end
    hud.elements[#hud.elements + 1] = element
  end

  -- Destroys the HUD.
  function hud:quit()

    if hud:is_enabled() then
      -- Stop all HUD elements.
      hud:set_enabled(false)
    end
  end

  -- Returns whether the HUD is currently enabled.
  function hud:is_enabled()
    return hud.enabled
  end

  -- Enables or disables the HUD.
  function hud:set_enabled(enabled)

    if enabled ~= hud.enabled then
      hud.enabled = enabled

      for _, menu in ipairs(hud.elements) do
        if enabled then
          -- Start each HUD element.
          sol.menu.start(game, menu)
        else
          -- Stop each HUD element.
          sol.menu.stop(menu)
        end
      end
    end
  end

  -- Returns whether the HUD is currently shown.
  function game:is_hud_enabled()
    return hud:is_enabled()
  end

  -- Enables or disables the HUD.
  function game:set_hud_enabled(enable)
    return hud:set_enabled(enable)
  end

  -- Call this function to notify the HUD that the current map has changed.
  local function hud_on_map_changed(game, map)

    if hud:is_enabled() then
      for _, menu in ipairs(hud.elements) do
        if menu.on_map_changed ~= nil then
          menu:on_map_changed(map)
        end
      end
    end
  end

  -- Call this function to notify the HUD that the game was just paused.
  local function hud_on_paused(game)

    if hud:is_enabled() then
      for _, menu in ipairs(hud.elements) do
        if menu.on_paused ~= nil then
          menu:on_paused()
        end
      end
    end
  end

  -- Call this function to notify the HUD that the game was just unpaused.
  local function hud_on_unpaused(game)

    if hud:is_enabled() then
      for _, menu in ipairs(hud.elements) do
        if menu.on_unpaused ~= nil then
          menu:on_unpaused()
        end
      end
    end
  end

  game:register_event("on_map_changed", hud_on_map_changed)
  game:register_event("on_paused", hud_on_paused)
  game:register_event("on_unpaused", hud_on_unpaused)

  -- Start the HUD.
  hud:set_enabled(true)
end

-- Set up the HUD features on any game that starts.
local game_meta = sol.main.get_metatable("game")
game_meta:register_event("on_started", initialize_hud_features)
return true

#8
General discussion / Re: HELP
March 10, 2017, 07:17:03 AM
I still need help, I can't figure it out... Please somebody help me...
#9
General discussion / Re: HELP
March 10, 2017, 04:57:44 AM
Quote from: Diarandor on March 09, 2017, 09:22:40 PM
Quote from: Boydie on March 09, 2017, 07:00:39 PM
Okay, I have another issue now...

I have one of the destinations set as default for the initial spawn point of the game...
But when I load it up it spawns me at another once... I have checked and I only have the one set as default, so I don't know why it keeps taking me to this one...

Ahoy there!

All maps that have destinations have a default one. But the starting destination for a game is a different thing. Check this:
http://www.solarus-games.org/doc/1.5/lua_api_game.html#lua_api_game_set_starting_location

It is recommended that you read all the Lua API, or the parts that you may need, at least once, so that you know the tools you have. Also, consult it frequently when you do not know how to do certain things.

You should also study/read the code of the official games, mainly the last ones (like ROTH SE) which have cleaner code. You will learn a lot from there.

Thanks dude, but I can't find the file project_db.dat
#10
General discussion / Re: HELP
March 09, 2017, 07:00:39 PM
Okay, I have another issue now...

I have one of the destinations set as default for the initial spawn point of the game...
But when I load it up it spawns me at another one... I have checked and I only have the one set as default, so I don't know why it keeps taking me to this one...
#12
General discussion / HELP
March 09, 2017, 01:55:54 PM
How do I make stairs & doors lead to another area? Please I'm new here...

Thank you!!
#13
Whenever I download it, it just says the file is corrupt & won't let me extract...
Any help please...

EDIT: I fixed this...

But how do I add them??