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

Pages: [1] 2 3 ... 13
1
Development / Re: Enemy sprite layers
« on: August 12, 2019, 02:41:19 pm »
You could make an enemy that creates another enemy on a different layer using map:create_enemy(), and then the script for the first enemy always moves the second enemy to be at its same location. It would then appear to be a single enemy. You'd probably want to make it so damaging enemy #2 causes damage to enemy #1 and also remove enemy #2 when #1 is killed.

2
Development / Re: How to configure game window
« on: August 05, 2019, 05:04:10 am »
The problem has to be reported in order to be fixed.

3
Development / Re: How to configure game window
« on: August 04, 2019, 09:39:26 pm »
On second thought, my quest doesn't actually have any scrolling screens (I was going to have one but removed it). Come to think about it, I may have reworked my quest to not have any side-scrolling maps because I encountered the same issue you did (it's been a while and I am forgetting).

I tested my quest out with a side-scrolling map and have similar issues to what you describe.

You'll probably get better traction with this problem if you open an issue on the gitlab repository: https://gitlab.com/solarus-games/solarus/issues

4
Development / Re: How to configure game window
« on: July 30, 2019, 01:24:39 am »
on_map_changed passes the map as an argument. Use that instead of game:get_map().

Code: (lua) [Select]
local function set_camera(game, map)
  local camera = map:get_camera()
  camera:set_size(256, 160)
  --camera:set_position_on_screen(0, 16)
end

In one of my projects I used the map:on_started() event instead of game:on_map_changed(). You could try that if the above still does not work. My code was as follows:

Code: (lua) [Select]
--// Setup the map to be displayed in the upper-right corner of the screen (all maps)
local map_meta = sol.main.get_metatable"map"
map_meta:register_event("on_started", function(self)
local camera = self:get_camera()
camera:set_size(320, 240)
camera:set_position_on_screen(304,16)
end)

5
Your scripts / Re: Enemy drop rate and multiple item drops
« on: July 13, 2019, 05:32:03 pm »
You are constantly reseeding the RNG, which will actually make things less "random". You should only set the random seed once when you start a game.

6
Development / Re: Where the pause menu is launched in XD2 ?
« on: May 31, 2019, 01:14:03 am »
You're going to have to be more specific about what steps you attempted to do...

This is how I interpret what you said; is it correct?
* You copied "scripts/menus/pause.lua" from XD2 and added it to your own quest
* You started the pause menu from your own quest, but nothing happens apart from pausing the game

If that's the case then it's because all pause.lua does is launch the various submenus (each screen you can scroll between). Try copying the following additional files to your quest and see if it works better:
* "scripts/menus/pause_inventory.lua"
* "scripts/menus/pause_map.lua"
* "scripts/menus/pause_options.lua"
* "scripts/menus/pause_quest_status.lua"

Or if that isn't the problem, then I'm guessing an error was printed to the console when you opened the pause menu. Please provide the content of that error message.

7
General discussion / Re: A new member joins the fray!
« on: May 27, 2019, 07:54:05 pm »
Some good resources for learning lua:
Programming in Lua (first edition) - Free electronic book, good for beginners to lua
Lua Reference Manual (lua version used by Solarus is 5.1) - Reference for standard lua functions
lua-users tutorials - Gives examples of using standard lua functions

8
Development / Re: Glitchy Text In Menu
« on: April 26, 2019, 11:57:09 pm »
I've noticed that Solarus v1.6 seems to be glitchy with text surfaces if text_surface:set_text() or text_surface:set_color() are called within an on_draw() function (which didn't happen in v1.5).

Try moving the self.menu_text:set_text_key() lines outside of the demo_screen:on_draw_main_demo() function and see if that helps.

9
Development / Re: Path Movement behaving weirdly
« on: April 17, 2019, 03:35:45 am »
I am not able to reproduce the problem you describe. Once the enemy starts its looking animation it doesn't seem to do anything else after. If I manually stop the movement during the path movement, then the enemy halts and the walking animation continues to be active.

Looking at the code, it seems that the only place the movement is started is in the on_restarted event(). My best guess would be that on_restarted() is getting called when you don't expect it to be. You could try adding a print statement in that event and see if it is getting triggered unexpectedly.

The other problem that is immediately obvious to me is that the look_around() function in the spotted==false condition can set chasing=false, set the path movement, then restart the enemy. But restarting the enemy will set a new path if chasing==false, so I don't think there's any point to setting the path in look_around().

10
Development / Re: Unit Testing and other questions
« on: April 13, 2019, 06:06:24 pm »
I don't know anything about frameworks like busted, but you can set up an external editor from the Solarus Quest Editor preferences on the "Text Editor" tab. Atom should be no problem, not sure about VSCode, but I'm guessing it could be made to work as well.

EDIT ZeroBrane is what the Solarus Team uses for lua debugging, so you could try that:
https://gitlab.com/solarus-games/solarus/tree/dev/work/ZBStudioPlugin

11
Bugs & Feature requests / Re: Multiple Entities Sponaneously Broken
« on: April 11, 2019, 11:40:11 pm »
So I added an animation for it now

You can't just go adding any old animation, it has to be the correct one. You should import the .dat file from the project where you got the small_key png file, then the dat file will be setup correctly and automatically get added to your quest (sprites need both the .png and .dat files to work correctly, so make sure you get both when importing).

If you simply copy the .dat file over to your project without using the import feature then it doesn't get added to your quest automatically, and in that case you will have to find the sprite in the quest tree (left sidebar of the quest editor), which will have a '?' icon. Right-click it then choose the option to add it to your quest.

12
Bugs & Feature requests / Re: Multiple Entities Sponaneously Broken
« on: April 11, 2019, 01:26:44 am »
I don't see the .dat file in that screenshot... that may be your problem.

13
Your projects / Re: AZ2R - Another Zelda 2 Remake
« on: April 10, 2019, 01:30:18 am »
What? The sleeping Zelda in Zelda II is a different Zelda from the one in the first game? This is news to me...

14
Bugs & Feature requests / Re: Multiple Entities Sponaneously Broken
« on: April 09, 2019, 02:41:13 am »
Then post the code from your on_created() event. You must have an error in there somewhere.

EDIT Also, try posting the following code in the console of the quest editor while your game is running:
Code: (lua) [Select]
print(sol.main.resource_exists("sprite", "items/dungeons/small_key"))

15
Bugs & Feature requests / Re: Multiple Entities Sponaneously Broken
« on: April 09, 2019, 01:15:43 am »
That first error indicates that line 6 of the items/dungeons/small_key.lua script encountered an error because it could not find the small key sprite located at sprites/items/dungeons/small_key.

I would start by adding that sprite to your quest. Errors that follow don't necessarily mean anything because when a script encounters an error it halts execution of the remainder of that script, so other scripts often have errors because of that script was not loaded fully.

Pages: [1] 2 3 ... 13