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] 2 3 ... 8
1
Your projects / Re: Long Steel
« on: December 23, 2019, 04:36:45 pm »
https://www.youtube.com/watch?v=PPdn8tu7VJ4

Just a brief update, I created a small trailer showing various dungeons and areas in the game.

2
You could probably use a sensor that changes the music, though it might be a bit tricky to make the transition of the music back and forth seamless.

3
Your projects / Long Steel
« on: September 27, 2019, 03:07:31 pm »
Hello, everyone. I've finally decided it was time for me to try and do a closed beta of my game, Long Steel.

Long Steel centers around a devious plot by the Wicken Cult to revive the Shaper of Magic, Warlock. The cultist's leader, Vex sets out on his plan to obtain Warlock's ashes, and return him to the Physical Realm. In order to stop him, you must set out on a quest to secure the ashes before Vex is able to get them. Fail to find the ashes before the Wicken do, and the world will plunged into darkness forever.

I've been working on this game in my spare time for the past four years now and I hope that some of you might be interested in helping me test it. I'm looking for all forms of feedback.

There are still some issues that aren't entirely worked out, but I feel that the game in its current iteration is well suited enough to begin proper testing. If anybody is interested please send me a PM with your gmail account. I'm going to be handing out the project via Google Drive. Thanks!



4
Development / Re: :on_interaction_item(item_used)
« on: September 06, 2019, 08:02:27 pm »
If the only problem with the code is that it is calling a string, all you would need to do is take away the quotation marks.

5
Development / Re: :on_interaction_item(item_used)
« on: September 06, 2019, 05:44:21 pm »
I haven't tested this so not sure if it'll work with what you're trying to do but maybe this could work.

Code: [Select]
function npc_1:on_interaction_item(item_used)
  if item_used == "boomerang" then
    sol.audio.play_sound("secret")
  end
end

6
Development / Half of tileset data gone?
« on: April 25, 2019, 04:46:09 pm »
Hey, so I was working on maps and adding on to tilesets and then when I went to run the game it said there was an error loading overworld.dat. When I went to check the file, like half of the tiles where gone the file was basically cut in half. Anyone got any idea how this could happen? I'm gonna have to reload via a system restore and work with what I can.

7
Development / Re: What changed in 1.5.3?
« on: December 29, 2018, 08:42:25 pm »
    I did what you said about the print() lines and what I've found is that it will continuously print between on and off when you are inside of the entity. However, this will happen for all of the entities except for one which will work perfectly fine. What I don't understand about this is the entity is supposed to be local so each entity should be unique, but it seems that this is caused by the timer of one entity overlapping with the others. So when the hero is overlapping an entity that is not the working one, the timer from the working one will read that the hero is not overlapping which causes it to disappear and reappear over and over.
   
   What I really find strange about this is that in version 1.5.0, the entity works perfectly fine. I've tried setting the timer as a function that stops when outside the entity and is called again what the collision activates, but this hasn't worked either. I'm really at a loss on what to do with this.  :-\

8
Development / Re: What changed in 1.5.3?
« on: December 27, 2018, 08:37:59 am »
Sure, sorry. I have a bad habit of not really using proper syntax when coding.  :P

Code: ( lua) [Select]
local entity = ...
local game = entity:get_game()
local map = entity:get_map()
local hero = map:get_hero()
local grass = false
local timer = nil

function entity:on_created()

  self:set_size(16, 16)
  self:set_modified_ground("traversable")
  self:set_traversable_by("hero", true)
  self:add_collision_test("center", function(self, hero)

  local x, y, layer = hero:get_position()

    if not map:has_entity("grassprite") and self:is_on_platform(hero) then -- create ground sprite if hero overlaps entity
      local grassprite = map:create_custom_entity({direction=0,
      layer=layer + 1,x=x,y=y, width = 16, height = 16, model="ground_effects/nightsplash", name = "grassprite"})
    end
  end)

  local timer = sol.timer.start(30, function() -- timer to check that hero is still overlapping

    if self:is_on_platform(hero) and (hero:get_state() == "free" or hero:get_state() == "carrying") then
      hero:set_walking_speed(70) -- reduce speed while in entity
   elseif self:is_on_platform(hero) and hero:get_state() == "sword_loading" then
      hero:set_walking_speed(29)
    elseif (not self:is_on_platform(hero)) and (hero:get_state() == "free" or hero:get_state() == "carrying") then
      hero:set_walking_speed(88) -- return speed to normal when outside of entity

    for entity in map:get_entities_by_type("custom_entity") do -- remove ground sprite when not overlapping
      if entity:get_model() == "ground_effects/nightsplash" then
        entity:remove()
      end
    end

    elseif (not self:is_on_platform(hero)) and hero:get_state() == "sword_loading" then
      hero:set_walking_speed(29)

      for entity in map:get_entities_by_type("custom_entity") do -- remove ground sprite when not overlapping
        if entity:get_model() == "ground_effects/nightsplash" then
          entity:remove()
        end
      end

------------------------------------------

  else

    for entity in map:get_entities_by_type("custom_entity") do -- remove ground sprite when not overlapping
      if entity:get_model() == "ground_effects/nightsplash" then
        entity:remove()
      end
    end

-------------------------------------------

    end
    return true
  end)

end

function entity:is_on_platform(other) -- function to check if hero overlaps entity
  local x, y, layer = hero:get_position()
  return entity:overlaps(x, y)
end



9
Development / Re: What changed in 1.5.3?
« on: December 26, 2018, 05:53:05 am »
I created a different entity using a simpler version of the code and I was able to get it to work with one but not with multiple entities. Multiple entities will have it work with one but multiple will make the ground effect flicker. Anyone get why this isn't working?

Code: ( lua) [Select]
local entity = ...
local game = entity:get_game()
local map = entity:get_map()
local hero = map:get_hero()
local grass = false
local timer = nil


function entity:on_created()

  self:set_size(16, 16)
  self:set_modified_ground("traversable")
  self:set_traversable_by("hero", true)

  self:add_collision_test("center", function(self, hero)



    if not grass then
     
      if hero:get_animation() == "walking" or hero:get_animation() == "walking_with_shield" or hero:get_animation() == "rolling" and not grass then
grass = true

    print(hero:get_walking_speed())

grass = false
        local x, y, layer = hero:get_position()



      sol.timer.start(self, 300, function()
  return true



      end)

      end
    end

        local x, y, layer = hero:get_position()

if not map:has_entity("grassprite") and self:is_on_platform(hero) then

local grassprite = map:create_custom_entity({direction=0,
    layer=layer + 1,x=x,y=y, width = 16, height = 16, model="ground_effects/nightsplash", name = "grassprite"})



end



  end)


  local timer = sol.timer.start(30, function()


    if self:is_on_platform(hero) and (hero:get_state() == "free" or hero:get_state() == "carrying") then

hero:set_walking_speed(70)

   elseif self:is_on_platform(hero) and hero:get_state() == "sword_loading" then

hero:set_walking_speed(29)






    elseif (not self:is_on_platform(hero)) and (hero:get_state() == "free" or hero:get_state() == "carrying") then

    hero:set_walking_speed(88)

for entity in map:get_entities_by_type("custom_entity") do
  if entity:get_model() == "ground_effects/nightsplash" then
    entity:remove()

  end
end

    elseif (not self:is_on_platform(hero)) and hero:get_state() == "sword_loading" then

    hero:set_walking_speed(29)

for entity in map:get_entities_by_type("custom_entity") do
  if entity:get_model() == "ground_effects/nightsplash" then
    entity:remove()

  end
end


------------------------------------------

  else

for entity in map:get_entities_by_type("custom_entity") do
  if entity:get_model() == "ground_effects/nightsplash" then
    entity:remove()

  end
end

-------------------------------------------

    end

    return true
  end)

end


function entity:is_on_platform(other)
  local x, y, layer = hero:get_position()
  return entity:overlaps(x, y)
end


10
Development / Re: What changed in 1.5.3?
« on: December 24, 2018, 03:58:09 am »
Hey, sorry to necro the thread, but as of the release of 1.6, the entity still doesn't seem to work. I'm going to try and look through the code to see what needs to be changed.

11
Development / Re: Lua promises
« on: December 03, 2018, 08:10:00 pm »
Not sure if it's really relevant to the topic or not, but you can have multiple movements happen simultaneously if you make each movement its own local function and then call all of them at the same time.

12
Development / Will reflections be possible in 1.6
« on: November 12, 2018, 05:25:35 pm »
With 1.6 will it be possible to make reflections like for a mirror or water?

13
Development / Re: Starting a menu from a dialog (NPC)?
« on: September 25, 2018, 04:30:23 pm »
I've done something similar so I'm just going to post the code that I used

Code: ( lua) [Select]
local map = ...
local game = map:get_game()
local crafting_menu = require("scripts/menus/crafting")
local hero = game:get_hero()

function fire:on_interaction()
  game:start_dialog("craft_cooking", function(answer)
    if answer == 3 then
      sol.menu.start(game, crafting_menu)
      game:set_pause_allowed(false)
      hero:freeze()
    end
  end)
end

function crafting_menu:on_finished()
  game:set_pause_allowed(true)
  hero:unfreeze()
end


14
Development / Is it possible to check when carried object hits ground
« on: August 18, 2018, 03:57:01 pm »
I'm trying to check a carried objects position so that its sprite will change to a falling effect when it lands on a hole. However, I'm having an issue where the effect will happen for every hole tile it goes over and I only want the effect to happen on the tile that it lands on not every tile that it goes over while being thrown.

15
Development / Re: Problem with thrown enemies after pause
« on: August 09, 2018, 04:56:39 am »
Yeah, using the sword causes the hero to throw the carried object.

Pages: [1] 2 3 ... 8