Thank you very much!
You are the best!
You are the best!
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 MenuQuote from: Neovyse on April 05, 2018, 02:25:22 PM
Do you know how to get it into the official list (so we can download Solarus docset in Dash/Zeal) ?
function hero:on_position_changed(x, y, layer)
-- Set diagonal movements for key
if (game:is_command_pressed("right") and not game:is_command_pressed("up") and not game:is_command_pressed("down")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (game:is_command_pressed("left") and not game:is_command_pressed("up") and not game:is_command_pressed("down")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (game:is_command_pressed("up") and not game:is_command_pressed("right") and not game:is_command_pressed("left")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (game:is_command_pressed("down") and not game:is_command_pressed("right") and not game:is_command_pressed("left")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (game:is_command_pressed("left") and game:is_command_pressed("up") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(1)
end
if (game:is_command_pressed("left") and game:is_command_pressed("down") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(2)
end
if (game:is_command_pressed("right") and game:is_command_pressed("up") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(0)
end
if (game:is_command_pressed("right") and game:is_command_pressed("down") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(3)
end
end
local function initialize_hero_features(game)
local hero = game:get_hero()
hero:set_tunic_sprite_id("her/her-normal")
function hero:on_position_changed(x, y, layer)
-- Set diagonal movements
if (sol.input.is_key_pressed("right") and not sol.input.is_key_pressed("up") and not sol.input.is_key_pressed("down")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (sol.input.is_key_pressed("left") and not sol.input.is_key_pressed("up") and not sol.input.is_key_pressed("down")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (sol.input.is_key_pressed("up") and not sol.input.is_key_pressed("right") and not sol.input.is_key_pressed("left")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (sol.input.is_key_pressed("down") and not sol.input.is_key_pressed("right") and not sol.input.is_key_pressed("left")) then
hero:set_tunic_sprite_id("her/her-normal")
end
if (sol.input.is_key_pressed("left") and sol.input.is_key_pressed("up") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(1)
end
if (sol.input.is_key_pressed("left") and sol.input.is_key_pressed("down") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(2)
end
if (sol.input.is_key_pressed("right") and sol.input.is_key_pressed("up") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(0)
end
if (sol.input.is_key_pressed("right") and sol.input.is_key_pressed("down") ) then
hero:set_tunic_sprite_id("her/her-diagonal")
hero:set_direction(3)
end
end
end
Quote from: dpro_games on January 09, 2018, 08:09:21 PM
I have already all setup on my raspberry pi 3 to create a solarus console with retropie.
I can add my own game. BUT, how can I do that?
I developed my game on windows with solarus 1.5.3. I have my "data.solarus" and now... What do I am supposed to do with all this?