Recent posts

#71
Development / Playable Ocarina and Day and N...
Last post by sun_yok - December 13, 2022, 12:49:24 PM
First of all, I want to thank all of y'all!! Just found out about Solarus this weekend and this is a blessing, I've been trying to do an idea of a game for years and only with two days using Solarus I already achieved a long time dream, now I'm switching my game to Solarus, I already made some progress on other Engine, but now I want to find out the way to do on Solarus, if y'all can help me I will be very grateful

I want to create a day and night cycle that works in: day and night/30days/4weeks/4months, anybody knows how to achieve it?

And I also wanna do a playable ocarina

I never programmed in lua, actually, the only program that I ever programmed with was RPG Maker, but I already achieved things in Solarus that makes me feel like when I was trying to learn RPG Maker when I was young.

Well, any help would be great, because I am trying to make my game works for at least 8 years, hope I finally have found a way to do it trough Solarus :)
#72
Development / Are there any examples for the...
Last post by gzuk - November 06, 2022, 11:48:09 AM
Hello, I read on the forums that you could use the new module coroutine_helper.lua to build cutscenes, to avoid endlessly nested callbacks.

However, I couldn't get it to work. I could only get one-time events to work, like playing a sound. I couldn't get the "only if game available" features to work, probably because I didn't make the game available in the right way.

Is there perhaps a working coroutine_helper game or example available, that uses the more complicated "only if game available" features, like dialogue, or characters moving around?

Many thanks for an answer!  :)
#73
Game art & music / Re: Lake Tileset with Animatio...
Last post by embarrassfat - October 30, 2022, 05:11:00 AM
This looks amazing. I like the logs.
#74
Development / Re: Making 3 wall blocks get d...
Last post by aaa - October 27, 2022, 05:14:58 PM
Thank you so much!!!
#75
Development / Re: Making 3 wall blocks get d...
Last post by Christopho - October 27, 2022, 08:57:26 AM
Check the new tutorial playlist here: https://www.youtube.com/playlist?list=PLzJ4jb-Y0ufwkbfy49F_NrLtxCAiGJw5r
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!
#76
Development / Making 3 wall blocks get delet...
Last post by aaa - October 27, 2022, 05:25:04 AM
Hello! I have little to no experience with programming, but I want to make a room with a route blocked by 3 wall blocks, and I want the route to become accessible once 2 torches are lit. How can I do that? Thank you very much!
#77
Development / Re: Make 2nd hero un-attackabl...
Last post by gzuk - September 24, 2022, 09:18:03 PM
Thank you very much. I've checked out your additions, and the on_attacking_hero function works very well. If you define it on both heroes and leave it empty, then the heroes won't hurt each other any more, like for a coop game.

I'll play around some more with the multiple heroes, and make a new post when something else comes up.
#78
Development / Re: Make 2nd hero un-attackabl...
Last post by stdgregwar - September 21, 2022, 11:02:48 AM
Hello !

You are right disabling friendly fire is a lacking feature. I added a way to do it in this merge request : https://gitlab.com/solarus-games/solarus/-/merge_requests/1421

It adds the `on_attacking_hero` event that can be used to short circuit the default behavior and decide what to do. To disable the friendly fire quest-wide you can add the event to the hero's metatable.

Thank you for testing the multiplayer features !

#79
Development / Re: Make 2nd hero un-attackabl...
Last post by gzuk - September 19, 2022, 08:57:48 PM
I saw that you can call state:set_can_be_hurt on a state object. And in the parameter function you could probably check if the attacker is another hero, and then do nothing. But I'd have to set that on all the default states ("free", "running", "sword swinging" etc.), and I don't know where these states are created or stored. Does anyone know how I could get a handle on all the default states?
#80
Development / Make 2nd hero un-attackable by...
Last post by gzuk - September 15, 2022, 09:37:01 AM
Hi, I tried out the new multiple heroes feature, but the default seems to be a player vs. player setup. The heroes hurt each other with their attacks, as in the "friendly fire" test map. For a coop quest, it would be nicer if you could also configure them to be immune to each other's attacks.

There are functions on the "enemy" type to configure attack reaction (set_attack_consequence), but these functions don't seem to exist on the "hero" type. In the CPP files, there are even more functions (is_sword_ignored), but it seems they have no Lua bindings.

Have I maybe overlooked an easy way to set this up? Or could it be implemented easily?