Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Game art & music / Re: [UDATE] Absolute Hyrule Map Package: WARNING: HUGE!
« Last post by brlmnd on June 23, 2017, 11:33:45 am »
Thank you ffomega!

We love you!
22
Game art & music / Re: [PACKAGE] Absolute Hyrule Map Package: WARNING: HUGE!
« Last post by ffomega on June 23, 2017, 11:18:31 am »
Attantion everyone! I left an update on the first page of this thread, stating that changes were made to the map pack.  These changes should not alter your current maps, UNLESS you used Jabu-jabu for your maps.

Please forgive the inconvenience!

Happy Mapping!!
23
Development / Re: Jump movement direction4 error?
« Last post by Zefk on June 23, 2017, 09:09:53 am »
I believe the problem is when picking the sprite from the custom entity. it seems to ignore directional change. The "Entity Create Jump Method" creates the sprite with script and it works. That is the only difference between the two functions.

1. Entity Create Jump Method = make sprite with script
2. Entity Jump Method = pick sprite from custom entity GUI

Entity Create Jump Method
Code: Lua
  1. -------------------------------------------
  2. --Entity Create Jump Method
  3. -------------------------------------------
  4. function metatable_entity:jump_create(sprite_directory, speed, traversable, set_can_traverse_hero, set_traversable_by_hero, ignore_obstacles, direction8, jump_distance, start_animation, finish_animation, finish_jump_sound, start_jump_sound, sound_timer, dialog, dialog_activation_distance)
  5.  
  6.   local map = self:get_map()
  7.   local hero = map:get_hero()
  8.   local game = map:get_game()
  9.   local sprite
  10.   local quick_movement
  11.  
  12.   --speed default value
  13.   if speed == nil then
  14.     speed = 40
  15.   end
  16.  
  17.   if traversable == nil then
  18.     traversable = false
  19.   end
  20.  
  21.   --By default the entity cannot traverse the hero
  22.   if set_can_traverse_hero == nil then
  23.     set_can_traverse_hero = false
  24.   end
  25.  
  26.   --By default the hero cannot traverse the entity.
  27.   if set_traversable_by_hero == nil then
  28.     set_traversable_by_hero = false
  29.   end
  30.  
  31.   --By default the entity does not ignore obstacles
  32.   if ignore_obstacles == nil then
  33.     ignore_obstacles = false
  34.   end
  35.  
  36.   if direction8 == nil then
  37.     direction8 = 0
  38.   end
  39.  
  40.   if jump_distance == nil then
  41.     jump_distance = 100
  42.   end
  43.  
  44.   --By default the sprite directory is the hero tunic1
  45.   if sprite_directory == nil then
  46.     sprite_directory = "main_heroes/Eldran"
  47.   end
  48.  
  49.   if start_animation == nil then
  50.     start_animation = "jumping"
  51.   end
  52.  
  53.   if finish_animation == nil then
  54.    finish_animation = "stopped"
  55.   end
  56.  
  57.   if start_jump_sound == nil then
  58.     start_jump_sound = "jump"
  59.   end
  60.  
  61.   if finish_jump_sound == nil then
  62.     finish_jump_sound = "jump"
  63.   end
  64.  
  65.   if sound_timer == nil then
  66.     sound_timer = 500
  67.   end
  68.  
  69.   --By default the welcome sign dialog is used.
  70.   if dialog == nil then
  71.     dialog = "welcome_sign"
  72.   end
  73.  
  74.   --dialog_activation_distance default value
  75.   if dialog_activation_distance == nil then
  76.     dialog_activation_distance = 20
  77.   end
  78.  
  79.   function self:on_created()
  80.     sprite = self:create_sprite(sprite_directory) -- sprite_directory
  81.     self:set_can_traverse("hero", set_can_traverse_hero) -- set_can_traverse_hero
  82.     self:set_traversable_by("hero", set_traversable_by_hero) -- set_traversable_by_hero
  83.     self:set_drawn_in_y_order(true)
  84.     self:set_traversable_by(traversable)
  85.  
  86.     quick_movement = sol.movement.create("jump")
  87.     self:get_sprite():set_animation(start_animation) -- animation
  88.     quick_movement:set_ignore_obstacles(ignore_obstacles) -- ignore obstacles
  89.     quick_movement:set_direction8(direction8) --direction8
  90.     quick_movement:set_distance(jump_distance) -- distance
  91.     quick_movement:set_speed(speed) -- speed
  92.     quick_movement:start(self)
  93.  
  94.     sol.timer.start(sound_timer, function() --finish_time
  95.                  sol.audio.play_sound(start_jump_sound) --finish_animation
  96.           end)
  97.    
  98.   end
  99.  
  100.   local set_stop_aniamtion = false
  101.  
  102.   sol.timer.start(450, function()
  103.  
  104.     function quick_movement:on_finished()
  105.       set_stop_aniamtion = true
  106.     end
  107.  
  108.     if set_stop_aniamtion == true then
  109.      sol.audio.play_sound(finish_jump_sound)
  110.                  self:get_sprite():set_animation(finish_animation) --finish_animation
  111.    return false
  112.     end
  113.  
  114.    return true
  115.   end)
  116.  
  117.   function self:on_interaction()
  118.     local distance_check = hero:get_distance(self)
  119.  
  120.     if distance_check <= dialog_activation_distance then -- dialog_activation_distance
  121.       if hero:get_direction() == 0 then
  122.         self:set_direction(2)
  123.         map:get_game():start_dialog(dialog) -- dialog
  124.       end
  125.       if hero:get_direction() == 1 then
  126.         self:set_direction(3)
  127.         map:get_game():start_dialog(dialog) -- dialog
  128.       end
  129.       if hero:get_direction() == 2 then
  130.         self:set_direction(0)
  131.         map:get_game():start_dialog(dialog) -- dialog
  132.       end
  133.       if hero:get_direction() == 3 then
  134.         self:set_direction(1)
  135.         map:get_game():start_dialog(dialog) -- dialog
  136.       end
  137.     end
  138.   end
  139.  
  140.   function self:on_movement_changed()
  141.      sprite:set_direction(quick_movement:get_direction4())  
  142.   end
  143. end

The following function is what does not work correctly. The above function is almost identical. This function does not work without the code I commented out.

Entity Jump Method
Code: Lua
  1. -------------------------------------------
  2. --Entity Jump Method
  3. -------------------------------------------
  4. function metatable_entity:jump(speed, traversable, ignore_obstacles, direction8, jump_distance, start_animation, finish_animation, finish_jump_sound, start_jump_sound, sound_timer, dialog, dialog_activation_distance)
  5.  
  6.   local map = self:get_map()
  7.   local hero = map:get_hero()
  8.   local game = map:get_game()
  9.   local quick_movement
  10.  
  11.   --speed default value
  12.   if speed == nil then
  13.     speed = 40
  14.   end
  15.  
  16.   if traversable == nil then
  17.     traversable = false
  18.   end
  19.  
  20.   --By default the entity does not ignore obstacles
  21.   if ignore_obstacles == nil then
  22.     ignore_obstacles = false
  23.   end
  24.  
  25.   if direction8 == nil then
  26.     direction8 = 0
  27.   end
  28.  
  29.   if jump_distance == nil then
  30.     jump_distance = 100
  31.   end
  32.  
  33.   if start_animation == nil then
  34.     start_animation = "jumping"
  35.   end
  36.  
  37.   if finish_animation == nil then
  38.    finish_animation = "stopped"
  39.   end
  40.  
  41.   if start_jump_sound == nil then
  42.     start_jump_sound = "jump"
  43.   end
  44.  
  45.   if finish_jump_sound == nil then
  46.     finish_jump_sound = "jump"
  47.   end
  48.  
  49.   if sound_timer == nil then
  50.     sound_timer = 500
  51.   end
  52.  
  53.   --By default the welcome sign dialog is used.
  54.   if dialog == nil then
  55.     dialog = "welcome_sign"
  56.   end
  57.  
  58.   --dialog_activation_distance default value
  59.   if dialog_activation_distance == nil then
  60.     dialog_activation_distance = 20
  61.   end
  62.  
  63. --[[
  64. --Manual jump direction check
  65.   if direction8 == 0 or direction8 == 1 then
  66.     if self:get_direction() == 1 then -- up
  67.       self:set_direction(0)
  68.     end
  69.  
  70.     if self:get_direction() == 2 then -- left
  71.       self:set_direction(0)
  72.     end
  73.  
  74.     if self:get_direction() == 3 then -- down
  75.       self:set_direction(0)    
  76.     end
  77.  
  78.     if self:get_direction() == 0 then-- right
  79.       self:set_direction(0)
  80.     end
  81.   end
  82.  
  83.   if direction8 == 2 or direction8 == 3  then
  84.     if self:get_direction() == 1 then -- up
  85.       self:set_direction(1)
  86.     end
  87.  
  88.     if self:get_direction() == 2 then -- left
  89.       self:set_direction(1)
  90.     end
  91.  
  92.     if self:get_direction() == 3 then -- down
  93.       self:set_direction(1)    
  94.     end
  95.  
  96.     if self:get_direction() == 0 then-- right
  97.       self:set_direction(1)
  98.     end
  99.   end
  100.  
  101.   if direction8 == 4 or direction8 == 6 then
  102.     if self:get_direction() == 1 then -- up
  103.       self:set_direction(2)
  104.     end
  105.  
  106.     if self:get_direction() == 2 then -- left
  107.       self:set_direction(2)
  108.     end
  109.  
  110.     if self:get_direction() == 3 then -- down
  111.       self:set_direction(2)    
  112.     end
  113.  
  114.     if self:get_direction() == 0 then-- right
  115.       self:set_direction(2)
  116.     end
  117.   end
  118.  
  119.   if direction8 == 6 or direction8 == 7 then
  120.     if self:get_direction() == 1 then -- up
  121.       self:set_direction(3)
  122.     end
  123.  
  124.     if self:get_direction() == 2 then -- left
  125.       self:set_direction(3)
  126.     end
  127.  
  128.     if self:get_direction() == 3 then -- down
  129.       self:set_direction(3)    
  130.     end
  131.  
  132.     if self:get_direction() == 0 then-- right
  133.       self:set_direction(3)
  134.     end
  135.   end
  136. --]]
  137.  
  138.     self:set_drawn_in_y_order(true)
  139.     self:set_traversable_by(traversable)
  140.  
  141.     quick_movement = sol.movement.create("jump")
  142.     self:get_sprite():set_animation(start_animation) -- animation
  143.     quick_movement:set_ignore_obstacles(ignore_obstacles) -- ignore obstacles
  144.     quick_movement:set_direction8(direction8) --direction8
  145.     quick_movement:set_distance(jump_distance) -- distance
  146.     quick_movement:set_speed(speed) -- speed
  147.     quick_movement:start(self)
  148.  
  149.     sol.timer.start(sound_timer, function() --finish_time
  150.                  sol.audio.play_sound(start_jump_sound) --finish_animation
  151.           end)
  152.  
  153.   local set_stop_aniamtion = false
  154.  
  155.   sol.timer.start(450, function()
  156.  
  157.     function quick_movement:on_finished()
  158.       set_stop_aniamtion = true
  159.     end
  160.  
  161.     if set_stop_aniamtion == true then
  162.      sol.audio.play_sound(finish_jump_sound)
  163.                  self:get_sprite():set_animation(finish_animation) --finish_animation
  164.    return false
  165.     end
  166.  
  167.    return true
  168.   end)
  169.  
  170.   function self:on_interaction()
  171.     local distance_check = hero:get_distance(self)
  172.  
  173.     if distance_check <= dialog_activation_distance then -- dialog_activation_distance
  174.       if hero:get_direction() == 0 then
  175.         self:set_direction(2)
  176.         map:get_game():start_dialog(dialog) -- dialog
  177.       end
  178.       if hero:get_direction() == 1 then
  179.         self:set_direction(3)
  180.         map:get_game():start_dialog(dialog) -- dialog
  181.       end
  182.       if hero:get_direction() == 2 then
  183.         self:set_direction(0)
  184.         map:get_game():start_dialog(dialog) -- dialog
  185.       end
  186.       if hero:get_direction() == 3 then
  187.         self:set_direction(1)
  188.         map:get_game():start_dialog(dialog) -- dialog
  189.       end
  190.     end
  191.   end
  192.  
  193.   function self:on_movement_changed()
  194.      self:set_direction(quick_movement:get_direction4())  
  195.   end
  196. end

Usage directions:
http://forum.solarus-games.org/index.php/topic,976.msg5677.html#msg5677

P.S. I plan to use tables for easier usage in the future.
24
Development / Re: On_interaction error?
« Last post by Diarandor on June 23, 2017, 07:35:27 am »
I confirm the bug. Check the github issue for more info.
25
Development / Re: Jump movement direction4 error?
« Last post by Diarandor on June 23, 2017, 07:07:39 am »
Could you post the full code of each script again? (The newest version.)

Also, indicate the filename of each script above its code. Then, if you want to comment something about the code, you only need to give the script name and the line number. (Copy-pasting isolated pieces of code does not help at all!!!)
26
Your projects / New Debian/Ubuntu Package Location
« Last post by Nate-Devv on June 23, 2017, 06:05:31 am »
Hi everyone!

For those who don't know, my name is Nate-Devv, and I've been creating Debian packages for the project since about version 1.3 or so. I've had a Lanchpad PPA for a little while now for strictly Ubuntu builds of the package, but since I run Debian myself, I have always been trying to find a way to host packages for Debian.

I believe I have done so now in a way that won't go away suddenly or become unreliable. I've uploaded the packages to the OpenSUSE build network. Here is a link to the entire project: https://build.opensuse.org/project/show/home:nate-devv
Here is a link to instructions to install the repository for apt: https://software.opensuse.org//download.html?project=home%3Anate-devv&package=solarus

I will still be keeping the Lanchpad PPA active, but I have also set the OpenSUSE project to compile for Ubuntu, and will probably be quicker at uploading there.

A quick overview of what the repository entails at this point:
The main Solarus engine and the Quest Editor
Five of the quests linked from the blog:
  • Zelda Solarus DX
  • Zelda Solarus XD
  • Zelda Return of the Hylian Solarus Edition
  • Zelda Book of Mudora
  • Tunics!
If there are any other quests that I should package for the project (i.e. Zelda XD2), let me know.
I will keep the packages available for the current LTS and release of Ubuntu (currently 16.04 and 17.04), along with Debian Stretch.
I will have the system build for Debian Jessie until Solarus 1.6.
27
Your projects / Re: iOS port
« Last post by Nate-Devv on June 23, 2017, 05:42:33 am »
Glad we finally have a Modern iOS port working. :) Kinda makes me want to see if I can get the Android port running again.
28
Game art & music / Re: Original art
« Last post by Diarandor on June 23, 2017, 04:15:45 am »
Ahoy there! Not much progress yet, but you may like this: the remastered "bow" animation for Eldran.
https://youtu.be/C7sos901PH8

A newer version will include the arrows in the shooting animation. Also, walking with the bow is a planned feature, so there will be new animations for Eldran stopped/walking while he is aiming with the bow.
30
Development / Re: Heart Fully Replenished - Help
« Last post by Diarandor on June 22, 2017, 12:22:53 am »
Hello! What would be the command to restore all life when you pick up a heart container? I know the logic but not the command = /

Ahoy there! There is not a single command to do that.
But if you already know the logic, you can easily do it.

You will find here the tools and commands that you may need:
http://www.solarus-games.org/doc/1.5/lua_api_game.html
The rest is just Lua, but I leave it as a programming exercise for you. ;)

PS: you can also find the code you need in any Solarus game made by Christopho.  :)
Pages: 1 2 [3] 4 5 ... 10