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 -

Pages: [1]
Bugs & Feature requests / Multiple Entities Sponaneously Broken
« on: April 08, 2019, 11:57:42 PM »
Hey again,

So I'm starting to near the end of my first dungeon, but just when I thought it was safe to move on, all of my locked doors broke (they no longer load in the game as an entity, as if they never existed), and what really confounds me is that a cutscene event I wrote that was working just fine before no longer works as well. Doors that are locked by switches are still functioning normally. There are multiple exceptions generated upon loading the game, none of which existed for most of the development process thus far. Below's an exhaustive list of those exceptions. If this has happened to you, I beg that you let me know what I need to go in and edit. Thanks much for your time.

Code: [Select]
Error: In on_created: items/dungeons/small_key.lua:6: module 'sprites/items/dungeons/small_key' not found:
Code: [Select]
Error: In create_door: bad argument #1 to ? (Bad field 'opening_condition' (equipment item 'dungeons/small_key' is not saved))
3) Error: In on_created: enemies/bosses/armos_knight.lua:18: attempt to call method 'set_arrow_reaction' (a nil value)

4) Error: In on_pickable_created: items/consumables/heart.lua:50: bad argument #1 to set_animation (Animation 'heart_falling' does not exist in sprite 'entities/items')

Important note: I have not tampered with any of the files pertaining to doors, pickables, or items. I have checked, and heart_falling & dungeons/small_key indeed exist and do so in their proper placement in the directory.

Hey again,

I've been playing around with the dialog scripts from Children of Solarus, in particular debug_dialog, dialog_box, and language_manager (I think that's right..?). However, upon inspection I can't figure out how to index the dialog ids I need to in order to start the loop, which I think is the function that'll let me rattle off multiple dialog boxes without generating the "dialog already active" exception. Maybe I've skimmed over some comment that gives instructions on that matter, but upon close inspection I don't think I have. I've also referenced back to the original tutorials, but those didn't help because all of the dialog boxes shown there are separated by input, whereas I just need to show two consecutive dialog boxes. Here's a link to each of those scripts, I was hoping I could reference the experience of someone who's already figured it out though.


Hope I don't waste anybody's time. Thanks much for reading.

Bugs & Feature requests / Cut Vines
« on: March 04, 2019, 12:48:11 AM »
Hey again,

So I've been making significant progress in the development of my little project, but I've been caught up in yet another snag that's going to have to be straightened out before I move on. That said, the snag involves an entity script (largely based on/rips off the hammer peg script) which is supposed to first make sure the vine entity (32x32px) is not traversable, then test if the hero is there (I think? It was a part of the hammer peg script), then see if player has obtained a sword (As it's the dungeon item) and then to see if the player is using the sword by testing for the animation "sword1". Then, if the player is calling that animation, then test whether or not the sword is within [arbitrary amount of pixels yet to be established, but 32 for now]. If it is, set the animation to "cut_vines".

When I run the script, I get no exception message, which is awfully confusing seeing as the vines aren't being cut. If you can see how I'm being lua-illiterate, I'd be more than obliged. Thanks much again for your time.

Code: [Select]
-- Lua script of custom entity vines.
-- This script is executed every time a custom entity with this model is created.

-- Feel free to modify the code below.
-- You can add more events and remove the ones you don't need.

-- See the Solarus Lua API documentation for the full specification
-- of types, events and methods:

local vines = ...
local game = vines:get_game()
local map = game:get_map()
-- Event called when the custom entity is initialized.

function vines:on_created()
  -- Initially, the vines are an obstacle for any entity.

local function test_collision_with_hero_sword(sword, entity)

  if entity:get_type() ~= "hero" then
    --If it's not the hero, don't heck with it
    return false
  if game:has_item("equipment/sword") ~= true then
    -- If he doesn't have the sword, heck him
    return false
    if hero:get_animation() ~= "sword1" then
    -- Don't bother testing collisions if the hero is not currently swinging his sword
    return false

  -- The hero is using the sword. Determine the exact point to test.
  local hero_direction = entity:get_direction()
  local x, y = entity:get_center_position()
  if hero_direction == 0 then
    -- Right.
    x = x + 32
  elseif hero_direction == 1 then
    -- Up.
    y = y - 32
  elseif hero_direction == 2 then
    -- Left.
    x = x - 32
    -- Down.
    y = y + 32

  -- Test if this point is inside the vines.
  return vines:overlaps(x, y)

vines:add_collision_test(test_collision_with_hero_sword, function(vines, entity)

  --change animation to broken

 -- Allow entities to traverse this.

  -- Disable collision detection, this is no longer needed.

  -- Notify people.
  if vines.on_cut ~= nil then

Bugs & Feature requests / Methods from OLB resources not working?
« on: February 11, 2019, 05:37:49 AM »
Hey again,

    Firstly I'd like to thank everyone on the server for being so helpful whenever I come with an amateurish problem I don't know how to solve. Really lively community around here and I genuinely appreciate the help. Anyways, moving on.
I've recently been studying up via the Tutorials, and I started using some of the resources provided there, in one instance in particular: In the episode covering the hud, in the description lies a link to some scripts used in Oni-Link Begins, which I promptly downloaded and installed, as an easy solution to a problem that I've spent more than two days on. However, when I ran it, I got one exception from each the key item script, and the key hud script, respectively. From what the error entailed, it looks like the engine doesn't seem to be recognizing any method that includes keys as a non-nil value. I checked the documentation, and I couldn't find any of those methods myself either, which indicates to me that there must be another script which defines those methods. I proceeded to sift through the directory where I got those scripts, looking for any code that mentions "keys", other than the ones I found and installed already.

Here's the exceptions:

Code: [Select]
Error: In on_started: scripts/hud/small_key.lua:19: attempt to call method 'are_small_keys_enabled' (a nil value)2)
Code: [Select]
Error: In on_obtaining: items/consumables/small_key.lua:12: attempt to call method 'add_small_key' (a nil value)
If anyone could help me sort out defining those methods, I'd be much obliged. Thanks much for your time.

Hey everyone, back after tiling a good portion of an overworld, and the entirety of my first dungeon, when I ran into a problem while I was making my project. I was attempting to create a simple script which enabled a chest to appear when all of the Ropes in the room were killed, until I got to the point through trial and error where I'd created a script I couldn't possibly refine anymore, but nonetheless failed to generate the desired result. Instead, it played the sound which indicates the appearance of a chest once the room was loaded. Consider the attached script. What do you think went wrong? Did I refer to the wrong prefix in the has_entities command? I'm not sure. Any help would be appreciated

Post-Script: Hey, I'm not sure where I'd put this, I didn't see a sub-forum that was marked "Help", although I'm notorious for overlooking obvious things. If the mods would move this post to that potentially extant topic-section, I wouldn't be mad.

I'm in the process of building my first dungeon, but in one room I presumed the player would be able to throw a pot across a gap to a switch. However, when I tested, I couldn't help but notice that the pot broke as soon as I threw it, as if the wall which represented the ledge was a wall in front of the hero's face. I tried a few things, but I couldn't figure out a way to get the pot over the ledge. Do y'all have any ideas?

Bugs & Feature requests / Having Trouble with Quest simulation
« on: January 06, 2019, 08:42:35 PM »
I've been back on Solarus ever since I saw it got updated again, but unfortunately I've not been able to get the "Run quest" function of the quest editor to run. Whenever I click "run quest", the screen merely remains blank (without presenting the solarus logo) and eventually I get the following error:

>Error: In main: scripts/game_manager.lua:103: attempt to call method 'register_event' (a nil value)

Here's the problem line:

>game_meta:register_event("on_map_changed", function(game)

However, when I go and check that particular line and cross-reference it with another line (located above line 103) that contains the method "register_event", it seems to be working just fine. Doesn't that mean that register_event has a non-nil value? For example, here's a line that makes use of register_event that does not incur an error, located above the problem line

>game:register_event("on_joypad_button_pressed", function(game, button)

Now, I know that this has "game:" instead of "game_meta:" but I changed it to "game:" and it gave me an error at that line. I'm not sure that'd make a difference either. Anyways, I probably need someone technically competent to aid me here, go ahead and comment if you need more info.

Pages: [1]