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.

Messages - Starlock

Pages: 1 ... 6 7 [8]
Development / Re: Trying to change key binding
« on: August 24, 2015, 11:41:47 PM »
I'm running 1.4.4 yet still it won't work. I feel like there must be some simple syntax error that I keep glossing over but nothing appears in error.txt besides that <eof> is expected near end on line 80... This is the full code with Diarandor's code example:
Code: ( lua) [Select]
-- Script that creates a game ready to be played.

-- Usage:
-- local game_manager = require("scripts/game_manager")
-- local game = game_manager:create("savegame_file_name")
-- game:start()

local dialog_box_manager = require("scripts/dialog_box")

local game_manager = {}

-- Sets initial values for a new savegame of this quest.
local function initialize_new_savegame(game)

-- Creates a game ready to be played.
function game_manager:create(file)

  -- Create the game (but do not start it).
  local exists =
  local game =
  if not exists then
    -- This is a new savegame file.
  local dialog_box

  -- Function called when the player runs this game.
 function game:on_started()
  -- Prepare the dialog box menu and the HUD.
  hud = hud_manager:create(game)
  pause_menu = pause_manager:create(game, exists)
  -- more code that I am using... and:
  -- Configure some joypad buttons. [Change this for a menu later!]
  game:set_command_keyboard_binding("action", "space_bar")
  game:set_command_keyboard_binding("attack", "e")
  game:set_command_keyboard_binding("item_1", "q")
  game:set_command_keyboard_binding("item_2", "w")

    dialog_box = dialog_box_manager:create(game)

  -- Function called when the game stops.
  function game:on_finished()

    dialog_box = nil

  function game:on_paused()

    game:start_dialog("", function(answer)
      if answer == 2 then

  local rupee_icon = sol.surface.create("hud/rupee_icon.png")
  local rupee_text = sol.text_surface.create()

  function game:on_draw(dst_surface)

    rupee_icon:draw_region(0, 0, 12, 12, dst_surface, 10, 220)
    rupee_text:draw(dst_surface, 25, 225)

  return game

return game_manager

Development / Re: Trying to change key binding
« on: August 24, 2015, 10:17:58 PM »
The game is able to run again now but the code still doesn't seem to affect the keys as it still uses the c key... I might try looking in the roth source code to see if it has anything that might make this work

Development / Re: Trying to change key binding
« on: August 24, 2015, 10:01:13 PM »
I tried that code and it gave me the error

Error: In on_finished: [string "scripts/game_manager.lua"]:83: bad argument #2 to set_command_keyboard_binding (string or nil expected, got string)      :-\

Development / Trying to change key binding
« on: August 24, 2015, 09:33:41 PM »
I tried to change the key binding for when you attack after obtaining the sword from the c key to the e key but whenever I load the game it still remains on the c key.
The code i used was

function game:on_character_pressed(key)
 if key == "e" then

Development / problem with scrolling to different maps
« on: August 19, 2015, 10:50:25 PM »
I'm trying to have the player be able to scroll between different maps but on one map it works fine but on the other the character wont appear going one way and appears on the wrong map the other way.

     |       |        |
     |  1   |    3  |
     |       |------|
     |       |    2   |

When going from 3 to 1 or 1 to 3 it works fine but when going from 2 to 1 the character appears at the top of 1 instead of near the middle/bottom and when going from 1 to 2 the player wont even appear. I've tried changing locations but it doesnt seem to be doing any good.

Bugs & Feature requests / Re: Tiles incorrectly sized when played?
« on: August 07, 2015, 12:30:35 AM »
Thanks that worked perfectly  :D

Bugs & Feature requests / Tiles incorrectly sized when played?
« on: August 03, 2015, 04:08:55 AM »
Whenever I attempt to test my quest, all walls are able to be partially walked through from behind and stop the hero a few pixels to early when walking forward. I don't understand why this is and the tiles are all correctly sized. Am I using the wrong type of pattern or is this a bug?

Bugs & Feature requests / Re: .dlls missing/deleting in 1.4
« on: July 17, 2015, 06:08:12 AM »
I was able to fix the problem it turned out to be my antivirus program that was deleting the dlls.  Thanks anyway  :)

Bugs & Feature requests / .dlls missing/deleting in 1.4
« on: July 16, 2015, 10:02:50 PM »
Every time I attempt to run the quest either or solarus it says an error that there is a missing .dll.For the quest editor lua51 is missing and for solarus the libmodplug-1 is missing but they appear before I run the application then they suddenly are deleted. I don't know why this is happening so could anyone please help with this?

Pages: 1 ... 6 7 [8]