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

Pages: [1] 2 3 ... 80
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!

Development / Re: Have a 2nd hero move, attack and be attacked
« on: September 08, 2022, 02:27:15 PM »
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
« on: 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?
« on: 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?
« on: 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):
Code: [Select]
elseif interruptor_a:is_activated() then
But you can save the state of the switch yourself when the switch gets activated, with
Code: [Select]
game:set_value("mymap_interruptor_a", true)and test that in map:on_started().

Bugs & Feature requests / Re: Resizable Streams
« on: 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
« on: December 03, 2020, 03:01:40 PM »
Are you able to run other quests?

Development / Re: Is there a Launcher version for windows 32xbit?
« on: November 14, 2020, 10:49:39 PM »
Here is a 32 bit build of the latest release (Solarus 1.6.4):

General discussion / Re: Start in fullscreen
« on: November 09, 2020, 10:05:51 AM »
Run it with:

Code: [Select]
solarus-run.exe -fullscreen=yes

Zelda Mystery of Solarus DX / Re: Chests Game Bug
« on: October 26, 2020, 01:28:11 PM »
 You need to finish dungeon 6 first.

Development / Re: Audio buffer error
« on: July 28, 2020, 10:59:00 AM »
It usually means that you are playing too many sounds at once.

Development / Re: Was anything in the engine recently changed
« on: June 11, 2020, 10:36:33 PM »
This is not a known issue, no. Do you have any error message before the crash?

General discussion / Re: Using a mouse to deturmine were the "hiro" looks
« on: January 24, 2020, 06:56:36 PM »
Yes this is possible. If I remember correctly, the sample quest does it.

Development / Re: Strange problem with a "set_enabled()"
« on: January 16, 2020, 12:35:58 AM »
Can you also show the code of your light_door entity?
Does it register an event on_enabled()? If yes, make sure it is a function.

Pages: [1] 2 3 ... 80