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.
#18
Development / Re: Few Questions
July 10, 2015, 11:09:25 AM
First, I suggest you to learn more about Solarus before launching you in a big project.
Christopho has made a big work and all is clearly explained in the documentation and video tutorials!![Smiley :)](https://forum.solarus-games.org/en/Smileys/default/smiley.gif)
1. See the menu API and the menu:on_key_pressed() event for the continue button.
Maybe that if your game is never load you need to understand why?
When the engine have errors he puts them in the error.txt file.
If there is no errors in this file, may be that's due to your script which do nothing or not what you expect.![Huh? ???](https://forum.solarus-games.org/en/Smileys/default/huh.gif)
2. See the audio API.
3. See the surface API and the menu:on_draw() event.
4. See the item API and the enemy API.
For the sword, you need to define a new variant in the sword item and add all sprites related to this variant.
Then you can define the behavior of enemies when hurting by the sword (and check the variant to make what do you want there) with the enemy:on_hurt_by_sword() event.
The best way is to use metatables for that but it is not easy for beginners, it allows to define an event for all objects of the a same type.
You can find an example in the quest_manager.lua script of zsdx.
5. See the NPC API and movement API.
You can find examples of scripts in the official games:
so, there you have a title menu script, sword item etc ...
Finally, I advise you to take the time to learn and to progress step by step.
Christopho has made a big work and all is clearly explained in the documentation and video tutorials!
![Smiley :)](https://forum.solarus-games.org/en/Smileys/default/smiley.gif)
1. See the menu API and the menu:on_key_pressed() event for the continue button.
Maybe that if your game is never load you need to understand why?
When the engine have errors he puts them in the error.txt file.
If there is no errors in this file, may be that's due to your script which do nothing or not what you expect.
![Huh? ???](https://forum.solarus-games.org/en/Smileys/default/huh.gif)
2. See the audio API.
3. See the surface API and the menu:on_draw() event.
4. See the item API and the enemy API.
For the sword, you need to define a new variant in the sword item and add all sprites related to this variant.
Then you can define the behavior of enemies when hurting by the sword (and check the variant to make what do you want there) with the enemy:on_hurt_by_sword() event.
The best way is to use metatables for that but it is not easy for beginners, it allows to define an event for all objects of the a same type.
You can find an example in the quest_manager.lua script of zsdx.
5. See the NPC API and movement API.
You can find examples of scripts in the official games:
so, there you have a title menu script, sword item etc ...
Finally, I advise you to take the time to learn and to progress step by step.
![Wink ;)](https://forum.solarus-games.org/en/Smileys/default/wink.gif)
#19
Bugs & Feature requests / [Forum] Code highlighting
July 07, 2015, 12:57:17 AM
There are more and more code that's shared on this forum. It is really nice! ![Smiley :)](https://forum.solarus-games.org/en/Smileys/default/smiley.gif)
But I think it is quite painful to read the code that aren't colorized.
I'm not familiar with SMF but I suppose that there are plugins for that, it would really be an improvement.
![Smiley :)](https://forum.solarus-games.org/en/Smileys/default/smiley.gif)
But I think it is quite painful to read the code that aren't colorized.
I'm not familiar with SMF but I suppose that there are plugins for that, it would really be an improvement.