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

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?

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?

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)

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.

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?

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

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

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

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 =
  local game =
  if not exists then
    -- This is a new savegame file.
  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.
    hud = hud_manager:create(game)
    pause_menu = pause_manager:create(game)

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

    -- Clean the dialog box and the HUD.
    hud = nil
    pause_menu = nil

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

    -- Tell the HUD we are paused.

    -- Start the pause menu., pause_menu)

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

    -- Tell the HUD we are no longer paused.

    -- Stop the pause menu.

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

  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]

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

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

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

  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

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

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.

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

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)

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