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

Pages: 1 2 3 [4] 5 6 ... 68
Development / Re: Custom entity and associate sprite : strange offset
« on: July 29, 2018, 06:25:41 pm »
That awesome feature will allow to have a hero of bigger or smaller size, which was a feature requested by many devs/artists using custom art of non-standard size. It will also allow to make a game like Minish Cap, where the hero can become smaller/bigger.

Bugs & Feature requests / Re: on_removed() warning issue?
« on: July 28, 2018, 12:52:00 pm »
You should check if the entity still exists. In on_removed:
Code: Lua
  1. if bookcase ~= nil and bookcase:exists() then
  2.   bookcase:set_enabled(false)
  3. end

Development / Re: Required Sound Effects?
« on: July 27, 2018, 03:55:57 pm »
You can always "steal" sounds from our free project.  :P

General discussion / Re: Free Pixel Art Making Programs
« on: July 23, 2018, 11:34:26 pm »
You won't regret it. I can't stop recommending Aseprite. It's very powerful, intuitive and simple at the same time. The layers feature is very important and you should use it a lot.

Development / Re: Pass multiple entities?
« on: July 22, 2018, 11:19:27 am »
The function map.get_entities_by_type(type) and other similar functions return an iterator. You can iterate on it to check all collisions at once! (see the Lua API). You can also define your own function, using those functions, and allowing to do things on iterators or lists, but it's not really necessary.

Development / Re: [Solved]Bomb overlap assistance
« on: July 22, 2018, 12:38:56 am »
An easy way to do this is to allow to define a custom event map.on_bomb_created(bomb_entity). You can call it, if it exists, from the bomb metatable (just define the function bomb_metatable.on_created).

General discussion / Re: Stealth Action Adventure Game Possible?
« on: July 22, 2018, 12:34:20 am »
You need to learn Lua, but also read carefully the Lua API of Solarus (there you have all the tools you need nicely explained). And of course, read others' scripts (as examples) and study their code, and make a lot of tests.

Is it my phone or the movement is not completely smooth? (I do not have internet at home now to check this.)

No one has tried. But it is all perfectly doable. The only problem is to find enough free time to create the art and code it.

Another important tool for this is the "custom properties" of Solarus 1.6. You can add a season property to some entities, and when that property is defined (not nil) and different from the current season, that entity would be destroyed when the map has been created. That together with the custom events are very flexible and powerful tools to work with.

I agree that using a different tileset for each season is the natural way to do so. The rod itself is just a sprite, which is very easy to do. But changing the season, appart from changing the tileset, would probably require some custom event(s) on each map, which would do some extra stuff depending on the season and the map itself.

I suggest the syntax: "map:on_season_changed(season)". Then your rod item script should be charged of changing the tileset (if possible) and calling these custom events (when they are defined).

Bugs & Feature requests / Re: Forum: Storage Full
« on: July 03, 2018, 05:38:08 am »
Someone should call the garbage collector... XD

General discussion / Re: What do you prefer for a shield?
« on: July 03, 2018, 05:31:06 am »
If you are a total noob, you should not start with the shield.
First do easy stuff and learn how to program easy stuff.
This shield is a bit experimental and may need some improvement.

Development / Re: Freezing/locking keyboard during specific event?
« on: June 25, 2018, 04:15:09 pm »
I tried it with map:has_entity("clone"), but it didn't work. He didn't start a second animation, thats true, but he still thinks there is a second usage of the item and he can't "remove" the sprite at the end.

We cannot help if you don't post the code or give enough information. It is unclear what you did.

I now added "game:on_map_changed(map)" with "game:set_command_keyboard_binding("item_1", "x")" in game_manager, so everytime I move to another map, the binding is set new. Seem to work, no errors   8)

I don't think it is a good idea to call "game:set_command_keyboard_binding" inside "game:on_map_change", even if it works. Something here seems very wrong to me. There should be a better way to do that.

Bugs & Feature requests / Re: Complex movements
« on: June 24, 2018, 07:59:41 pm »
If you are doing basic stuff, better not to read my code and try it yourself with timers and movements. Always start with short code and basic stuff.

Pages: 1 2 3 [4] 5 6 ... 68