Menu

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.

Show posts Menu

Messages - Starlock

#1
Development / Ground sprite changed on map change
December 21, 2020, 05:29:32 PM
I was remaking my custom grass to be more optimal by using a modified ground with an animation change to the grass sprite. It works perfectly except for when you go to a different map it will change back to the default animation for a second before changing back to the modified animation. Does anyone know of any workaround, I've tried using map:on_started(), map:on_finished(), game:on_map_changed() and none of these so far have worked.

  entity:add_collision_test("overlapping", function(entity, hero)
    if hero:get_sprite("ground") ~= nil then
    hero:get_sprite("ground"):set_animation("purple")
    end
  end)
#2
Your projects / Re: Long Steel
November 13, 2020, 05:29:21 PM
I did make some changes to the sword length and added more hints in the beginning to guide where people are supposed to go, though I suppose some beta cheats could be useful too.
#3
Your projects / Re: Long Steel
November 13, 2020, 03:53:18 AM
I'd say give or take the main story would take around 12 hours to complete. Even if you don't have time to do a full run every little bit of feedback helps at this stage of production.
#4
Your projects / Re: Long Steel
October 13, 2020, 03:06:31 AM
Brief update, I'm basically done with the game as a whole, but I could still use people to help find bugs.
#5
The only thing that shows up is this:

"Warning: Image 'sprites/hud/gameover_fade.png' is larger than 2048 x 2048 and may not render correctly on some systems"

But that occurs when the game over screen first starts, not when hitting continue.
#6
I had always used 1.6.0 and had no problems, but I recently started using 1.6.4 and now whenever I use save and continue or dont save and continue at the game over screen the game crashes. Is there any known issue regarding game:start() ?
#7
Your projects / Re: Long Steel
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.
#8
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.
#9
Your projects / Long Steel
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!


#10
Development / Re: :on_interaction_item(item_used)
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.
#11
Development / Re: :on_interaction_item(item_used)
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.

function npc_1:on_interaction_item(item_used)
  if item_used == "boomerang" then
    sol.audio.play_sound("secret")
  end
end
#12
Development / Half of tileset data gone?
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.
#13
Development / Re: What changed in 1.5.3?
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.  :-\
#14
Development / Re: What changed in 1.5.3?
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



#15
Development / Re: What changed in 1.5.3?
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