Menu

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

#631
Bugs & Feature requests / Re: Bomb Flower Bug
September 08, 2016, 10:47:03 AM
This bug is already known and Christopho is going to fix it for Solarus bugfix 1.5.1.
https://github.com/christopho/solarus/issues/953
#632
Development / Re: Getting all strings in strings.dat?
September 04, 2016, 06:44:25 PM
I think there is not a direct/clean way to get the keys/values, so yes, you would need to do that with some script that looks for them in the strings.dat file.

By the way, why do you need to get these values?
#633
QuoteLike layer 0 is some level that the player can walk over, layer 1 is tiles that are at the same level of the player, layer 2 is tiles that can be above the player.
This is not true. The hero can be in a layer different than 1 and he can change its layer (stairs, teleporters,...).
Note that you can add more layers in the Editor, positive and negative layers, and as many as you want (believe me, I have set the max layer to be 2000 in the Editor and a giant context menu with 2000 labels has tried to kill me :o).
#634
Development / Re: Pausing?
September 01, 2016, 10:36:52 AM
Christopho has explained me now how to use it, I think it's like this (I have not checked it yet):
Code (Lua) Select
local foo = require("script"); foo:f(game)
I have to clean my code with this. It seems that load_file is important for other purposes, but as a non-programmer that is out of my knowledge... and for our purposes we should avoid it.

EDIT: I updated the function, I had posted something wrong. But I guess you will need an initializer function.
#635
Development / Re: Pausing?
September 01, 2016, 04:41:38 AM
;D
#636
Development / Re: Pausing?
September 01, 2016, 04:25:53 AM
Hi, it is very strange that your script works, because your on_paused/unpaused functions are defined in a game entity that seems not defined, which should produce an error unless you have some global variable "game". (It is not usually a good idea to use global variables.) You should initialize the game variable in the script giving it from some other script, maybe with the loading syntax:
Code (Lua) Select
sol.main.load_file("scripts/volume_control.lua")(game)
and then start your volume_control script with local game = ... so that the game variable is stored. (There is another way to get the game variable to be defined in other script: using some function that initializes it, but for this purpose you need the script to return some table with the initializer function.)

QuoteThe pause functions do not work when calling scripts/volume_control.
-Are you sure that you don't have defined these functions twice? (Maybe in the game maganer you have other definition.) If so, the second definition would override the first one. Check farefully your other scripts to make sure that this is not happening.
-Do you get some error?
#637
Update:
-The sound of the magnet has been replaced by a less annoying one.
-The magnet can now move the hero when used on "magnet-rocks".
-There are still some small issues to fix.
https://www.youtube.com/watch?v=P6vuT5Apq4Q&list=PLysNP7i5PKBCgT898-xreWyPcaByEB6Rg
#638
Development / Re: Pausing?
August 31, 2016, 03:06:50 PM
-I do not understand what you mean by "a script related to get_game()". Note that "get_game()" is a function defined for some entities that returns the game entity in which they exist.
-Also, I do not know in which script are your pause functions defined; are they in the volume_control script or in the game manager script?

Could you explain all of this a bit better?
Or even better, put a copy of these scripts: the game manager and the script where your pause functions are defined. That will be faster.
#639
Development / Re: Pausing?
August 31, 2016, 07:16:08 AM
The error says that your variable "game" is not defined. Probably you forgot to define it in the map script with:
Code (Lua) Select
local game = map:get_game()
#640
Development / Re: Pausing?
August 31, 2016, 04:04:04 AM
Hi! Not necessarily, you can define it in other script if you want. But since that function is defined for the game entity, the recommended place to put that code is in the game manager just after the creation of your game entity (with other similar functions). An alternative is to define it in the game metatable, which needs to be done only once, because it will be immediately defined for all game instances you create (so the main script, or other script which is loaded only once, would be a good place in this case).
#641
Yeah! Heheh.
(Estimated release date: for the end of the year 2024! ;D XD)
#642
Thanks! Although it will take a lot of time to finish the game (several years probably). I am still not working on the maps and puzzles because I am still working on the items and art...
#643
Greetings!!!
New video of a new scripted experimental item: the magnet. ;D
This is still unfinished (I have not coded yet the feature to attract/repel the hero towards "metallic rocks" stuck in the ground). There are also some issues to be fixed.
Link here: https://youtu.be/Z_dXtTY6N6M
#644
Your projects / Re: Zelda: Book of Mudora
August 30, 2016, 07:19:22 AM
Congrats wrightmat! ;D
#645
Development / Re: Trouble with dialog function syntax
August 24, 2016, 07:50:32 PM
Where you wrote
if self.game:get_max_life(60) then
the code should be like this:
if self.game:get_max_life() == 60 then
There are more "if" conditions with the same mistake.
I hope this solves the problem.