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.


Topics - Starlock

Pages: 1 2 [3] 4
31
Development / Possible to create a level up system?
« on: January 05, 2016, 05:18:37 AM »
For my game, I want to create a leveling system that is a mix of ideas between Zelda 2 and Skyrim. Every time you reach a new level you can choose to raise either health, magic, or stamina with a max level of 10 for each, making a maximum total level of 30.

First off, is such a system possible with the engine. Second, if it is how would I get started creating it?

32
Development / Different crystals for every dungeon
« on: January 03, 2016, 05:38:43 AM »
Hey, I was working on making crystal/crystal block sprites for dungeons. Is there a way for every dungeon to have a different sprite for crystals rather than all of them using the same ones?

33
Development / Bomb Soldiers?
« on: January 02, 2016, 05:53:37 PM »
I noticed while looking through the zsdx and roth repositories that there were no bomb or bow soldiers. Is it possible to make an enemy that throws bombs?

34
Development / How do you code turret type enemies?
« on: December 23, 2015, 04:51:49 AM »
I'm not too sure about how to go about making turrets that remain stationary but continuously fire(I supposed using a timer)

One turret would fire in one direction but does not change direction to follow the hero, one fires in four main directions(N,S,E,W) and another that fires in eight direction (N,NW,NE,W,E,SW,SE,S)

35
Development / Lens of Truth?
« on: November 17, 2015, 05:50:25 PM »
Hey, I would like to try to create an item similar to the Lens of Truth from OoT, and I would just like to make sure something like that is possible. My initial thought process is to make the item enable specific dynamic tiles while it is being used and then re-disable them when the item is no longer in use.

36
Development / Question about Switches
« on: October 30, 2015, 07:31:51 PM »
Hey I'm having a bit of trouble with arrow switches. 1)When I shoot an arrow, the arrow goes straight through the switch rather than activating it. 2) Is it possible to require more than one switch in order to activate a dynamic tile like a bridge?

37
Development / Using timers in custom entitites
« on: October 11, 2015, 05:22:37 AM »
Hey so I was trying to make a custom entity that restores health over time. The code basically works fine but the timer covers the entire map rather than just when traversing the entity. Is there a way to make it so the hero has to be on the entity for the timer to activate?

Also, how do i change the hero animation on the entity because set_animation doesnt seem to be working...

38
Development / Moving data to new computer
« on: October 02, 2015, 09:53:41 PM »
I just got a new laptop and I tried to move the data to it, but now the screen is black and I am receiving an error that did not exist on my original computer.

"Error: In timer callback: [string "scripts/menus/title.lua"]:27: attempt to index local 'zs_presents_img' (a nil value)"

I had this error before, but it was fixed so I'm not sure why it is suddenly reappearing when I have double checked that the image required exists under languages

39
Development / Problems with dialog and HUD
« on: September 05, 2015, 02:44:21 AM »
In game manager I keep getting an error towards the hud: "Error: In on_map_changed: [string "scripts/game_manager.lua"]:75: attempt to index upvalue 'hud' (a nil value)"

and the dialog box creates the error:  Error: In on_started: "[string "scripts/dialog_box.lua"]:59: attempt to call field 'get_dialog_font' (a nil value)"

Clearly the problem is about the nil values but when I try defining either of them the error remains so I'm not quite understanding what to do....

Game_manager.lua
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 game_manager = {}

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

  -- Create the game (but do not start it).
  local exists = sol.game.exists(file)
  local game = sol.game.load(file)
  if not exists then
    -- This is a new savegame file.
    game:set_starting_location("house")
    game:set_max_money(99)
    game:set_max_life(12)
    game:set_life(game:get_max_life())
    game:get_item("rupee_bag"):set_variant(1)
  end
 
  sol.main.load_file("scripts/dialog_box.lua")(game)
  sol.main.load_file("scripts/game_over.lua")(game)
  local hud_manager = require("scripts/hud/hud")
  local hud
  local pause_manager = require("scripts/menus/pause")
  local pause_menu

  -- Function called when the player runs this game.
  function game:on_started()

    -- Prepare the dialog box menu and the HUD.
    game:initialize_dialog_box()
    hud = hud_manager:create(game)
    pause_menu = pause_manager:create(game)
  end

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

    -- Clean the dialog box and the HUD.
    game:quit_dialog_box()
    hud:quit()
    hud = nil
    pause_menu = nil
  end

  -- Function called when the game is paused.
  function game:on_paused()

    -- Tell the HUD we are paused.
    hud:on_paused()

    -- Start the pause menu.
    sol.menu.start(game, pause_menu)
  end

  -- Function called when the game is paused.
  function game:on_unpaused()

    -- Tell the HUD we are no longer paused.
    hud:on_unpaused()

    -- Stop the pause menu.
    sol.menu.stop(pause_menu)
  end

  -- Function called when the player goes to another map.
  game.on_map_changed = function(game, map)

    -- Notify the HUD (some HUD elements need to know that).
    hud:on_map_changed(map)
  end

  local custom_command_effects = {}
  -- Returns the current customized effect of the action or attack command.
  -- nil means that the built-in effect.
  function game:get_custom_command_effect(command)
    return custom_command_effects[command]
  end

  -- Overrides the effect of the action or attack command.
  -- Set the effect to nil to restore the built-in effect.
  function game:set_custom_command_effect(command, effect)
    custom_command_effects[command] = effect
  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

  local rupee_icon = sol.surface.create("hud/rupee_icon.png")
  local rupee_text = sol.text_surface.create()
  rupee_text:set_font("8_bit")
 
  function game:on_draw(dst_surface)
 
    rupee_icon:draw_region(0, 0, 12, 12, dst_surface, 10, 220)
    rupee_text:set_text(game:get_money())
    rupee_text:draw(dst_surface, 25, 225)
  end
 

  return game
end

return game_manager


And this is line 59 of the dialogbox script
Code: ( lua) [Select]
local font, font_size = sol.language.get_dialog_font()

40
Development / Diablo like health/magic?
« on: September 02, 2015, 03:31:47 AM »
Is it possible for the hearts and magic bar used in ZSDX to be instead shown as red and blue orbs like in Diablo? I tried to simply use the code and custom graphics but I'm not exactly sure how to compile the graphics to create a HUD.

41
Development / Question about dynamic tiles
« on: August 27, 2015, 02:26:43 AM »
If you wanted to make a shovel that was able to dig at dirt to reveal treasures similar to that of the shovel in Link's Awakening would you have to turn all ground tiles into dynamic tiles? Like would you make the ground dynamic and then under it there would be patches of dirt that are revealed after the ground has been dug? I'm just checking to see if this is the basic idea before I attempt to code a shovel

42
Development / Problem w global go value
« on: August 26, 2015, 03:01:44 AM »
I'm trying to make a crab that throws a stone using the roth code for an octorok but everytime I run it the sprite disappears during the "shooting" animation with the error:

Error: In timer callback: [string "enemies/crab.lua"]:53: attempt to call global 'go' (a nil value)

43
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
game:get_command_keyboard_binding("attack")   
   end
  end

44
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.

45
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?

Pages: 1 2 [3] 4