Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Development / How to mantain the chest activated? (Solved!)
« Last post by leon on February 21, 2022, 08:16:20 PM »
Hi,

I want the chest to stay activated when I hit the switch, even if it hasn't opened. So when I leave the map and return, the chest remains visible and the switch has already been activated.

I tried this, but without success.

The reference is the lesson 17 on YT.

hereĀ“s the code,  first_map.lua

Code: [Select]
function map:on_started() 
  if bau_tunica:is_open() then  --"BAU_TUNICA" IS THE CHEST
    bau_tunica:set_enabled(true)
    interruptor_a:set_activated(true)  --"INTERRUPTOR_A" IS THE SWITCH
  elseif interruptor_a:is_activated() then  --this is my attempt
    bau_tunica:set_enabled(true)
  end
end

function fogo:on_interaction()
  game:start_dialog("salvar_jogo-perguntar", function(resposta)
    if resposta==1 then
      game:save()
      game:start_dialog("jogo_salvo")
    end
  end)
end

function interruptor_a:on_activated()
  sol.audio.play_sound("cursor")
  bau_tunica:set_enabled(true)
end

22
Your projects / Re: Ocean's Heart
« Last post by milirlly on February 16, 2022, 04:34:30 PM »
Whoa, this forum is still active?
23
Development / Re: sprites is a directory
« Last post by Spikira on February 11, 2022, 02:51:01 AM »
24
Development / sprites is a directory
« Last post by Peter on January 26, 2022, 10:05:40 PM »
When I start my game I get this error message:
Quote
Info: Fullscreen: no
Info: Language: en
Info: Lua console: yes
Info: Turbo mode: no
Info: Simulation started
Fatal: Data file 'sprites/' is a directory

What is causing this?

(My game is rather small. 2 rooms and one self-made item.)
25
Your projects / Re: Ocean's Heart
« Last post by Spikira on January 14, 2022, 07:43:19 AM »
26
Development / Re: Hero Run/Dash/Sprint
« Last post by Spikira on January 14, 2022, 07:41:24 AM »
Oh, you're making a increase walking speed kinda dash instead? OK. But if you want something akin to rolling in Minish Cap the link is here: https://forum.solarus-games.org/en/index.php/topic,1161.msg6851.html#msg6851
27
Development / Re: Hero Run/Dash/Sprint
« Last post by cabanas.ds on January 11, 2022, 03:16:35 PM »
I figured it out with help from discord folks.

-- Hero Dash when 'X' Held

function map:on_key_pressed(key)

if key == "x" then
sol.audio.play_sound("jump")
hero:set_walking_speed(200)

end end
function map:on_key_released(key)

if key == "x" then
hero:set_walking_speed(88)

end end
 
28
Development / Re: Hero Run/Dash/Sprint
« Last post by cabanas.ds on January 10, 2022, 02:20:40 PM »

There's a built in run function similar to the Zelda series. Just call 'game:set_ability("run", 1)' to enable running similar to that by holding the Action Button.

just tried this, it's more of a running attack than a 'running boots' style dash.

kind of cool but still not dash.
29
Development / Re: Hero Run/Dash/Sprint
« Last post by cabanas.ds on January 07, 2022, 02:49:09 PM »
There's a built in run function similar to the Zelda series. Just call 'game:set_ability("run", 1)' to enable running similar to that by holding the Action Button. If you want it on an item or something else, I believe it's 'hero:start_running()'.

Thank you, I will give this a go.

I have now realised since the space/action button has a sword power up i should add this to my Y button!
30
Development / Re: Hero Run/Dash/Sprint
« Last post by Spikira on January 06, 2022, 05:22:12 AM »
There's a built in run function similar to the Zelda series. Just call 'game:set_ability("run", 1)' to enable running similar to that by holding the Action Button. If you want it on an item or something else, I believe it's 'hero:start_running()'.
Pages: 1 2 [3] 4 5 ... 10