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.

Show posts Menu

Messages - Christopho

I eventually found them later, and they can now be found in the ALTTP Resource Pack.
An alternative way is to make a target movement towards the hero, and stop that movement when the distance between the NPC and the hero gets below some threshold. I think it is done that way in the Zelda A Link to the Dream project.
Your choice, I guess it depends on whether you want the NPC to follow exactly the same path as the hero or not.
Hi! Nice to see that you enjoy creating your game with Solarus and that you are making progress :)

One way to create a day and night cycle is to use timers. You can create a timer that fires every X milliseconds, where X is the length of a day in your game. When the timer fires, you can increment the current time of day and update the lighting and music in your game accordingly.

To create a playable ocarina, you can use the input system to detect when the player presses certain buttons on the keyboard or gamepad. You can then use that information to play a sound effect and display a visual effect on the screen to simulate the ocarina being played.

If you have not programmed in Lua before, it may take some time to learn the language and understand how to use it with Solarus. I recommend the Programming in Lua online book for that. Once you know some basics about Lua, good places to help you get started are the Solarus tutorials and documentation, the forums here and Discord.

I hope this helps and good luck with your game!
Check the new tutorial playlist here:
Episode #57 covers exactly that (making something happen when torches are lit), but you first need all the basics including custom entities (episode #54). Have fun!
This tutorial covers attacking enemies with a custom entity (some fire in this example, but for any projectile this can apply):
The next version of Solarus will support multiple heroes, so maybe you can consider switching to the development version. We'd be happy to hear your feedback by the way because this is still experimental!
Development / Re: Missing resources
March 28, 2022, 10:04:39 AM
It is normal that the entities folder is empty: there are no custom entity scripts by default (but that might change in the future).
Which sprite is missing from destructibles?
Development / Re: How to mantain the chest activated?
February 23, 2022, 09:45:23 AM
game:set_value() is documented here:
It sets a variable that can be saved in the savegame file, which is what you want if I understand correctly. So that the information (the switch state) is preserved when the player leaves and reenters the map, or even if they save and quit. You just need to choose a name for your saved variable, in my code snippet I put "mymap_interruptor_a" as an example but it is up to you to choose a relevant name. And the value is a boolean: true to indicate that the switch is activated, false (or unset) otherwise.

Then in map:on_started(), call game:get_value() to retrieve the state of the switch, and if it is saved as activated, then activate it with interruptor_a:set_activated(true).

If you are lacking Lua basics in general, I would recommend the Programming in Lua free guide:

PS: I just check tutorial 17. In that tutorial, I use the state of the treasure chest (which is automatically saved, as set by a checkbox in the quest editor) to guess the state of the switch, so actually I don't have to do all that.
Development / Re: How to mantain the chest activated?
February 21, 2022, 10:29:06 PM
The state of the switch is not saved automatically: you have to save it explicitly. In other words, this condition is always false in map:on_started() (when the map starts):
elseif interruptor_a:is_activated() then

But you can save the state of the switch yourself when the switch gets activated, with
game:set_value("mymap_interruptor_a", true)
and test that in map:on_started().
Bugs & Feature requests / Re: Resizable Streams
November 08, 2021, 02:33:13 PM
Not sure if entity:set_size() was tested a lot on streams, but that should be a solution in theory.
Another possible workaround is to make a custom entity model (they are resizable) whose only effect is to dynamically create streams on all its 16x16 squares with map:create_stream().
Development / Re: Can't run sample quest
December 03, 2020, 03:01:40 PM
Are you able to run other quests?
General discussion / Re: Start in fullscreen
November 09, 2020, 10:05:51 AM
Run it with:

solarus-run.exe -fullscreen=yes
Zelda Mystery of Solarus DX / Re: Chests Game Bug
October 26, 2020, 01:28:11 PM
 You need to finish dungeon 6 first.
Development / Re: Audio buffer error
July 28, 2020, 10:59:00 AM
It usually means that you are playing too many sounds at once.
This is not a known issue, no. Do you have any error message before the crash?