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.


Topics - Zefk

Pages: [1] 2 3 ... 6
1
Development / [Solved]Timer problem
« on: July 16, 2018, 12:00:52 am »
I have a problem with my script. The switches are suppose to reset after 5 seconds when they are all activated. They do reset, but the one second timer is already running through again and I cannot activate any switches for another 5 seconds.

Code: Lua
  1. function map:on_started()
  2.  
  3.   sol.timer.start(1000, function()
  4.     if solid_1:is_activated() == true and solid_2:is_activated() == true and solid_3:is_activated() == true and solid_4:is_activated() == true then
  5.       sol.timer.start(5000, function()
  6.         solid_1:set_activated(false)
  7.         solid_2:set_activated(false)
  8.         solid_3:set_activated(false)
  9.         solid_4:set_activated(false)
  10.       end)
  11.     end
  12.     return true
  13.   end)
  14.  
  15. end


2
Game art & music / Project Heroine Sprites
« on: July 11, 2018, 04:13:51 am »
I am showing off the sprites I mentioned in the Female Character Hairstyles topic. So far I got the front, back, and side views finished, but I still need to modify the sprites colors + make the other animations.

These sprites are based off of the Eldrina Sprite I made. Eldrina is a mod of Diarandor's Eldran v1.1 Sprite. This sprites project would not even exist if it was not for Diarandor and I am thankful for his amazing art that just keeps getting better.

Project Heroine Sprites: (Login to view)



For history purposes: Plexa

3
General discussion / A funny thing about forums
« on: July 04, 2018, 01:21:36 am »
A lot of messager services were discontinued, but a space for them still exist on forums. I found it odd that there is no option to just add the type of service one uses.

Discontinued:
AOL Instant Messenger (Discontinued (December 15, 2017)) Wiki
MSN Messenger (Discontinued, 2013) Wiki

Still Exist:
ICQ
YIM





4
Bugs & Feature requests / Forum: Storage Full
« on: July 03, 2018, 12:58:00 am »
The upload folder is full. Please try a smaller file and/or contact an administrator.

My file was 1.4 KB

Should we go through our attachments and free up storage?

5
Game art & music / Gimp Script: deep-float-copy
« on: July 03, 2018, 12:37:33 am »
Okay, I decided to put the deep-float-copy script in this section because it is related to Gimp. Feel free to move it.

The deep-float-copy script is something I found online, but it was broken for gimp 2.8, so I fixed it. Gimp still has not improved its layers as far as I know.

It is useful for copying link layers that are selected. Make sure to select the area of the linked layers or a few error messages will appear. The preview below shows the character being selected. Float Linked Layers (Copy) will instantly copy all the linked layers.

Install:
Linux: Put it in /home/YourName/.gimp-2.8/scripts
Other: https://en.wikibooks.org/wiki/GIMP/Installing_Plugins#Copying_the_plugin_to_the_GIMP_plugin_directory

Image Example + sneak peak:
Preview

Downloads:
Download (Login to download)
Alternative Download


6
Bugs & Feature requests / Site link not working: Tunics Wiki
« on: June 27, 2018, 08:13:05 pm »
Solarus Website > Games > By the community > Tunics!

It seems the Tunics DokuWiki no longer exists, but it can still be seen on WaybackMachine.
https://web.archive.org/web/20171028100334/http://tunics.legofarmen.se:80/start
https://github.com/Legofarmen/tunics/tree/master/data

7
Game art & music / Female character hairstyles
« on: May 13, 2018, 07:24:22 am »
Hi everyone,

It has been awhile.

I am making a bunch of free female characters. I am wondering if I missed a major hair style?

Ponytail is covered by the way...just have not made the view points. Also, I aware that overlaying the styles can make new ones.




~Zefk

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






































10
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?

11
Development / [Solved]Array in function?
« on: May 15, 2017, 06:07:00 am »
I get the following error:
Code: [Select]
0] Error: Failed to load script 'scripts/lib/zefk_entity_lib.lua': [string "scripts/lib/zefk_entity_lib.lua"]:2093: '(' expected near '['
when trying this:

Code: Lua
  1.   function sprites[index]:on_animation_finished()
  2.     sprites[index]:set_animation(end_anime)
  3.     sol.audio.play_sound(end_sound)
  4.   end

The following function will only work if I convert my array to a normal variable.

Code: Lua
  1.     sprites2 = sprites[2]
  2.   function sprites2:on_animation_finished()
  3.     sprites[index]:set_animation(end_anime)
  4.     sol.audio.play_sound(end_sound)
  5.   end

Is there a way around this because I'd like to on_animation_finish() without having a limit set. I do not want to do something like this:

Code: Lua
  1.    
  2.  sprites2 = sprites[2]
  3.   function sprites2:on_animation_finished()
  4.     sprites[index]:set_animation(end_anime)
  5.     sol.audio.play_sound(end_sound)
  6.   end
  7.  
  8.  sprites1 = sprites[1]
  9.   function sprites1:on_animation_finished()
  10.     sprites[index]:set_animation(end_anime)
  11.     sol.audio.play_sound(end_sound)
  12.   end
  13.  
  14.  sprites3 = sprites[3]
  15.   function sprites3:on_animation_finished()
  16.     sprites[index]:set_animation(end_anime)
  17.     sol.audio.play_sound(end_sound)
  18.   end
  19.  
  20.  sprites4 = sprites[4]
  21.   function sprites4:on_animation_finished()
  22.     sprites[index]:set_animation(end_anime)
  23.     sol.audio.play_sound(end_sound)
  24.   end
  25.  
  26.  sprites5 = sprites[5]
  27.   function sprites5:on_animation_finished()
  28.     sprites[index]:set_animation(end_anime)
  29.     sol.audio.play_sound(end_sound)
  30.   end
  31.  

12
Development / [solved]Jump movement direction4 error?
« on: May 10, 2017, 05:55:26 am »
I made the following two functions. The bug happens with my entity:jump function. It seems not to want to change the facing direction.

Code: Lua
  1. entity:jump_create() -- default jump sprite Eldran is created for this one.

and

Code: Lua
  1. entity:jump() -- no sprite set to be created

The direction does not change even though I set:

Code: Lua
  1.   function self:on_movement_changed()
  2.      self:set_direction(quick_movement:get_direction4())  
  3.   end

The problem only occurs if I do not manually create the sprite with script. (If I do not pick the sprite from the custom entity.)

Code: Lua
  1.    
  2.   function self:on_created()
  3.      sprite = self:create_sprite(sprite_directory) -- sprite_directory
  4.   end
  5.  
  6.   function self:on_movement_changed()
  7.      sprite:set_direction(quick_movement:get_direction4())  
  8.   end
  9.  

What makes no sense is I have other functions with identical code. For example, entity:wander() and entity:follow(). Both those functions use a sprite I picked from the custom entity and work perfectly.

I used "self:set_direction(quick_movement:get_direction4())" on both of those functions and they change direction correctly.

Code: Lua
  1.   function self:on_movement_changed()
  2.      self:set_direction(quick_movement:get_direction4())  
  3.   end

My only solution was to manually check.
Code: Lua
  1.  if direction8 == 0 or direction8 == 1 then
  2.     if self:get_direction() == 1 then -- up
  3.       self:set_direction(0)
  4.     end
  5.  
  6.     if self:get_direction() == 2 then -- left
  7.       self:set_direction(0)
  8.     end
  9.  
  10.     if self:get_direction() == 3 then -- down
  11.       self:set_direction(0)    
  12.     end
  13.  
  14.     if self:get_direction() == 0 then-- right
  15.       self:set_direction(0)
  16.     end
  17.   end
  18.  
  19.   if direction8 == 2 or direction8 == 3  then
  20.     if self:get_direction() == 1 then -- up
  21.       self:set_direction(1)
  22.     end
  23.  
  24.     if self:get_direction() == 2 then -- left
  25.       self:set_direction(1)
  26.     end
  27.  
  28.     if self:get_direction() == 3 then -- down
  29.       self:set_direction(1)    
  30.     end
  31.  
  32.     if self:get_direction() == 0 then-- right
  33.       self:set_direction(1)
  34.     end
  35.   end
  36.  
  37.   if direction8 == 4 or direction8 == 6 then
  38.     if self:get_direction() == 1 then -- up
  39.       self:set_direction(2)
  40.     end
  41.  
  42.     if self:get_direction() == 2 then -- left
  43.       self:set_direction(2)
  44.     end
  45.  
  46.     if self:get_direction() == 3 then -- down
  47.       self:set_direction(2)    
  48.     end
  49.  
  50.     if self:get_direction() == 0 then-- right
  51.       self:set_direction(2)
  52.     end
  53.   end
  54.  
  55.   if direction8 == 6 or direction8 == 7 then
  56.     if self:get_direction() == 1 then -- up
  57.       self:set_direction(3)
  58.     end
  59.  
  60.     if self:get_direction() == 2 then -- left
  61.       self:set_direction(3)
  62.     end
  63.  
  64.     if self:get_direction() == 3 then -- down
  65.       self:set_direction(3)    
  66.     end
  67.  
  68.     if self:get_direction() == 0 then-- right
  69.       self:set_direction(3)
  70.     end
  71.   end

13
Development / On_interaction error?
« on: May 08, 2017, 12:08:12 pm »
I did the following with a custom entity, but the dialog is still called (if I keep pressing the spacebar) when the entity is far away unless I move the hero. How can I fix this?

Edit: This is probably a bug. A quick solaution is to check the distance with on_interaction() Here

Code: Lua
  1.   function self:on_interaction()
  2.     if hero:get_direction() == 0 then
  3.       self:set_direction(2)
  4.       map:get_game():start_dialog(dialog)
  5.     end
  6.     if hero:get_direction() == 1 then
  7.       self:set_direction(3)
  8.       map:get_game():start_dialog(dialog)
  9.     end
  10.     if hero:get_direction() == 2 then
  11.       self:set_direction(0)
  12.       map:get_game():start_dialog(dialog)
  13.     end
  14.     if hero:get_direction() == 3 then
  15.       self:set_direction(1)
  16.       map:get_game():start_dialog(dialog)
  17.     end
  18.   end


14
Development / Debug.info with pcall question?
« on: May 07, 2017, 06:31:01 am »
My problem is that I do not know how to pcall my function "Error()". Error() needs to be inside the entity:example() to work.

Lib.lua
Code: Lua
  1. local metatable_entity = sol.main.get_metatable("custom_entity")
  2.  
  3. function metatable_entity:example()
  4.   Error()
  5. end
  6.  
  7. function Error()
  8.     local level_1 = debug.getinfo(1) --Error() is level 1
  9.     local level_2 = debug.getinfo(2) --Name of function being called from is level 2
  10.     local level_3 = debug.getinfo(3) -- Return from where ever the function was declared is level 3
  11.     print ("-----------------------------------------------------------------------------------------------------------")
  12.     print(level_3.short_src.." => "..level_1.name.. " was called by function [".. level_2.name.. "] at line " .. level_3.currentline)
  13.     print ("-----------------------------------------------------------------------------------------------------------")
  14. end
  15.  

Entity script:

Code: Lua
  1. entity:example()

Output:
Code: [Select]
-----------------------------------------------------------------------------------------------------------
[string "entities/follower.lua"] => Error was called by function [example] at line 1
-----------------------------------------------------------------------------------------------------------

15
Development / [Solved]pcall metatable?
« on: May 05, 2017, 09:30:23 am »
How does a pcall or xpcall error message work with a metatable?
http://www.solarus-games.org/doc/latest/lua_api_main.html#lua_api_main_get_metatable

Pages: [1] 2 3 ... 6