As far as I know, requires are usually written at the top of your script, and I recommend to do so (so that others can see the dependencies and avoid errors if some required file is missing). Think on them as "imports", since they are just that.
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.
#47
Your projects / Re: Vegan on a Desert Island
October 05, 2018, 08:31:01 PM
Have you played Survival Kids from the gbc? (Gameplay here: https://www.youtube.com/watch?v=eQet3NwtHO4) I played it a little bit and I believe this game might have taken some inspiration from there too, or at least it has some things in common. I never finished it because it was too hard for a casual player like me, though. If you haven't played it, I recommend you to take it a look at it for inspiration and good ideas in your game.
#48
Game art & music / Re: Original art
September 29, 2018, 04:53:18 PM
Here you can see all the current art for princess Robyne:
https://youtu.be/BQUT6aQroGs
https://youtu.be/BQUT6aQroGs
#49
General discussion / Re: Site Security
September 27, 2018, 07:52:03 PM
Mmmm, ok, so it's not a secret anymore. XD
#50
General discussion / Re: Site Security
September 27, 2018, 12:04:12 PM
And the new website is a secret. So don't tell anyone! :p
#51
Development / Re: How to filter an entity iterator?
September 24, 2018, 12:24:34 AM
The best way to do that is exactly the way you are doing it:
Always put the stronger condition in the outer built-in iterator, because that one is optimized. (For instance, getting first the custom entities and later the "rectangle overlapping" condition would be slightly slower). In this case you cannot do it with only 1 loop (you need to filter with "if" conditions).
Code (Lua) Select
for entity in map:get_entities_in_rectangle(x, y, width, height) do
if entity:get_type() == "custom_entity" and entity:get_model() == "trash" then
-- blablabla cats meow meow!
end
end
Always put the stronger condition in the outer built-in iterator, because that one is optimized. (For instance, getting first the custom entities and later the "rectangle overlapping" condition would be slightly slower). In this case you cannot do it with only 1 loop (you need to filter with "if" conditions).
#52
Game art & music / Re: Original art
September 23, 2018, 12:55:28 AM
Ongoing work: wizard Teleido, the final boss:
#53
Development / Re: LUA IDE?
September 21, 2018, 02:49:55 AM
Notepad++ is a quite good choice. I use it.
PS: yes, it is not an IDE, I think.
PS: yes, it is not an IDE, I think.
#54
General discussion / We have moved
September 20, 2018, 11:50:26 AM
Just to inform people who may be interested in asking questions in the chat: the team has left Gitter and moved to Discord (#solarus chanel). Also recall that we left the Github repos and we are working on Gitlab.
#55
Your projects / Re: Vegan on a Desert Island
September 17, 2018, 12:09:18 AM
This is awesome! I love charming retro games like this. I can't wait to play this.
#56
Development / Re: Need help making a Redead AI that acts similar to Ocarina of time
September 14, 2018, 01:52:36 AM
I think that lines 57 and 69 should go inside their timers above. Otherwise, if the enemy is restarted (and therefore all timers stopped), your enemy will break its behavior, as you can check if I'm not wrong. (Even if the hero is frozen, the enemy could be hurt by the boomerang or other thing, and so restarted too.)
#57
Development / Re: Need help making a Redead AI that acts similar to Ocarina of time
September 14, 2018, 12:11:48 AM
Could you post the last code, so that it can be reviewed for new possible advices? That will help beginners who read your code too.
EDIT: and I forgot: congrats! you completed the challenge! XD
EDIT: and I forgot: congrats! you completed the challenge! XD
#58
Development / Re: Need help making a Redead AI that acts similar to Ocarina of time
September 13, 2018, 11:26:13 PM
You are right that the code is not ok. And there are a few more things wrong with the last code of Max, but if you read carefully, you can find them (exercise!). You will need to move/rewrite a few things to fix it. I challenge you, Akamatsu, to fix it!
[insert samurai emoticon here]
Edit: I think Max had in mind a different behavior for the Zombi thing, without restarting the freezing feature, or he wrote it too fast.
[insert samurai emoticon here]
Edit: I think Max had in mind a different behavior for the Zombi thing, without restarting the freezing feature, or he wrote it too fast.
#59
Development / Re: Need help making a Redead AI that acts similar to Ocarina of time
September 13, 2018, 02:28:01 PM
Briefly: explain, this: "the code doesn't work anymore it just runs it once".
#60
Development / Re: Need help making a Redead AI that acts similar to Ocarina of time
September 13, 2018, 08:33:39 AM
It is a bit risky to put the unfreezing timer on the enemy (the enemy could be killed when hero is frozen, for instance, by a boomerang, or other things). I recommend to put that timer (and maybe others) on the map, and get the frozen state with: hero:get_state() == "frozen".