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 - Zefk

Pages: [1] 2 3 ... 33
1
Quote
This is incredibly awesome!!! :o
Probably the best software for this.

This is the best software for generating music that I encountered. Also, ".mid" instruments and music can be changed with a midi software like Anvil Studio. (I should add that to the list) The ".mid" audio format is one of my favorites because the music files can be super small. The 55 second music sample I attached above was less than 7 kb. That is perfect for forum posts.

Quote
I wonder how we can distinguish nowadays a true composer from a fake one who uses software like this to compose music...

Let us just hope the person is honest and it is clearly stated that it was generated. A lot of companies keep their custom software a secret, so I do not think we will ever truly know. Some composers might generate a good tune and edit it to fit their needs.

2
Added:

2.5 - cgMusic - This software is amazing. It literally randomly generates music using algorithms.

At comment 105 at the site he mentions that it is okay to use them in "games" if credits clearly state that cgMusic was used during music production and it would be great if he could get a copy of the game. (but it is said in a way that one does not have to) It would be nice to credit Maciej Biedrzycki in my opinion.

Quote
Maciek says:
September 8th, 2014 at 3:05 pm
@alfwein Actually, I’ve been getting a lot of questions about the possibility of using cgMusic commercially and generally I was allowing it. The only thing I ask is that it is clearly stated in the credits that cgMusic was used during music production. Also it would be great if I could get a copy of the game, to see how the music was used :)

Anyway, this credit is important as copyright law is very unclear when it comes to algorithmic compositions. I would like everyone to avoid potential problems – after all the program can give two people identical results if the same random seed is used.

I attached a piece I generated with CgMusic.

3
Game art & music / Re: [Tool] Palette Swapping tool
« on: June 29, 2017, 11:42:02 pm »
The link is still down. Just to let you know in case you forget due to being busy.

4
Development / Re: Jump movement direction4 error?
« on: June 24, 2017, 07:32:36 am »
Quote
2) This part is really confusing and gives problems:

Ah, I think you are correct about the timer. I will do some tests later. That would not prevent a facing direction change though.

Quote
1) Your events on_interaction() and on_movement_changed() are not called the first time you create a jump, because they are defined inside your function "metatable_entity:jump". These events should be defined outside that function. Although the variable quick_movement is not defined outside the function "jump", you can still access the movement with entity:get_movement().

Everything is defined in my "Entity Create Jump Method" and it works, so I am not sure that is the problem. The only difference is that function self:on_created() is inside the script and the sprite is created by the function instead of being picked from the custom entity.

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

Quote
I can paste a copy of the modified script if you want. It works and the sprite of the custom entity is always facing the direction of the jump, which I believe is what you wanted (otherwise I did not understand your final purpose).

I found the problem. The problem is that the facing direction will not change because function entity:on_movement_changed() is inside the function entity:on_created(). Taking it out results in correct direction change. That means it is not a bug I think. That is the only reason my script does not work for facing direction change.

I declared my function like this and that is why will not work.

function entity:on_created()
   entity:jump()
end

Try it out if you do not believe me.

Code: Lua
  1. local entity = ...
  2. local game = entity:get_game()
  3. local map = entity:get_map()
  4.  
  5. function entity:on_created()
  6.  
  7.     entity:set_drawn_in_y_order(true)
  8.     entity:set_traversable_by(true)
  9.  
  10.     quick_movement = sol.movement.create("jump")
  11.     entity:get_sprite():set_animation("jumping") -- animation
  12.     quick_movement:set_ignore_obstacles(true) -- ignore obstacles
  13.     quick_movement:set_direction8(2) --direction8
  14.     quick_movement:set_distance(100) -- distance
  15.     quick_movement:set_speed(100) -- speed
  16.     quick_movement:start(entity)
  17.  
  18.   function entity:on_movement_changed()
  19.      entity:set_direction(quick_movement:get_direction4())  
  20.   end
  21. end

I will go ahead and close the issue I reported.

5
Development / Re: Jump movement direction4 error?
« on: June 24, 2017, 01:37:20 am »
If you cannot figure it out by trying my script yourself, then I do not know what to tell you. The script is very simple in my opinion. It is just a bunch of defaults,  self properties, and movement functions. That is if we ignore the stop/start jump sound and interaction part of the script.

The only thing that needs to be looked at is this:
(I would suggest making a custom entity and apply a jump movement to it.)

Code: Lua
  1. function entity:on_created()
  2.     self:set_drawn_in_y_order(true)
  3.     self:set_traversable_by(traversable)
  4.  
  5.     quick_movement = sol.movement.create("jump")
  6.     self:get_sprite():set_animation(start_animation) -- animation
  7.     quick_movement:set_ignore_obstacles(ignore_obstacles) -- ignore obstacles
  8.     quick_movement:set_direction8(direction8) --direction8
  9.     quick_movement:set_distance(jump_distance) -- distance
  10.     quick_movement:set_speed(speed) -- speed
  11.     quick_movement:start(self)
  12.  
  13.   function self:on_movement_changed()
  14.      self:set_direction(quick_movement:get_direction4())  
  15.   end
  16. end

The problem lies with picking the sprite from the custom entity. If this is done, then the custom entity will not face the proper direction when jumping.


If the custom entity sprite is created with code, then the custom entity faces the proper direction. That is all I know.
Code: Lua
  1.  sprite = self:create_sprite(sprite_directory) -- sprite_directory

Why would "only" making the custom entity sprite from script work for the jump movement? I do not understand why the sprite will not face the proper direction when it is picked from the custom entity. That is literally the only major difference between the two scripts I posted previously. I only get this facing direction problem with the "jump" movement. That is why I think it is a bug.

Note:
I did not make this post for the following. (I do however appreciate the tips and advice because I will change my code later.)
1. Report an issue for a debug lesson
2. Shorten my code
3. Shorten the temporary fix.

6
Development / Re: Jump movement direction4 error?
« 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.

8
General discussion / [Debug] Pokemon Original Games
« on: June 18, 2017, 07:13:28 am »
I thought this video was interesting. It could help a game creator to think of ways to prevent bugs that pros made in the past.
https://youtu.be/VGlZu2hoAiE?t=92

In my opinion, key items will prevent these bugs from occurring for quests.

9
Game art & music / Re: [Tool] Palette Swapping tool
« on: June 14, 2017, 07:07:40 am »
@MetalZelda
The link is down and there is some formatting issue.

Quote
Grab this tool here.
http://www.filedropper.com/paletteswap

This tool will ease your life, especially for those who re-use some material with another color (the hero for example), this will make your job.

What you need:
[/b][/i][/u]

10
Development / Re: How to get the hero in an item script?
« on: June 06, 2017, 06:09:15 am »
One solution is using "self". I did this when making boots that speed up walking.

Code: Lua
  1. function item:on_obtaining()
  2.   self:get_map():get_entity("hero"):set_walking_speed(120)
  3. end
  4.  
  5. if game:get_value("sola_house_f1_heart_gem_finish") then
  6.   function item:on_map_changed(map)
  7.     self:get_map():get_entity("hero"):set_walking_speed(120)
  8.   end
  9. end

11
Bugs & Feature requests / Re: Universal Windows App
« on: May 22, 2017, 05:30:46 am »
I think this would be an interesting port. They say Xbox One will be compatible with Xbox Scorpio. My stance against it has lessened if that is really true because it has been looking like Microsoft wants to make all past hardware/operating systems obsolete after a new release. My sources above say that Universal Windows Platform (UWP) will not work on operating systems before Windows 10.
http://www.xbox.com/en-US/project-scorpio

12
General discussion / 19 transitions
« on: May 18, 2017, 10:37:10 am »
I made many transitions in Gimp from scratch. I still have some tweaking to do, but I plan to have these 320x240 transitions setup as animations. Of course, I plan to have these as CC0, so they will be free for any usage.

What does everyone think? Did I miss any basic transition?

Gimp Playback Previews:






































13
Your projects / Re: Allied AI Script Project Alpha
« on: May 16, 2017, 09:07:31 am »
These sprite draw functions that I made for this project can draw a sprite at:

1. The hero
2. An entity
3. A position

It can remove:

1. Any sprite index
2. All of them at once

By default it uses a death animation.

Code: Lua
  1. --create 4 sprites and draw on map
  2. entity:sprite_create(4, map)
  3.  
  4. --Draw at coordinates
  5. entity:sprite_draw(1,"main_heroes/eldran", 130,100, true)
  6.  
  7. --Draw at coordinates
  8. entity:sprite_draw(2,"main_heroes/eldran", 100,100, true)
  9.  
  10. --draw at hero
  11. entity:sprite_draw(3,"main_heroes/eldrina/eldrina", 0,0, true, start_anime, start_sound, end_anime, end_sound, true, hero_visable, false)
  12.  
  13. --draw at an entity named "old"
  14. entity:sprite_draw(4,"main_heroes/eldrina/eldrina", 0,0, true, start_anime, start_sound, end_anime, end_sound, hero_pos, hero_visable, false, direction, true,"old", entity_visable)
  15.  
  16. --remove sprite 1
  17. entity:sprite_undraw(1)
  18.  
  19. --remove all sprites if true
  20. entity:sprite_undraw(1,true)
  21. --or
  22. --remove all sprites if true
  23. entity:sprite_undraw(true)

They all fall down.

14
Development / [Solved]Screen vs entity position?
« on: May 15, 2017, 05:27:31 pm »
That was the first thing I tried because I saw it in the Children of Solarus game_over.lua script. It seems I forgot to repeat my timer when checking my script, so a mistake on my part. Thank you Christopho and Zutokaza for the assistance. My script works perfectly now.

15
Development / [Solved]Screen vs entity position?
« on: May 15, 2017, 01:51:17 pm »
Is there a formula I could use to calculate screen image x,y coordinates to the entity position? For example, drawing an image at the hero. I am not sure that entity:get_position() is related to this because is not that position different than image x,y coordinates?

Pages: [1] 2 3 ... 33