Few Questions

Started by aLinktotheDead, July 10, 2015, 08:54:55 AM

Previous topic - Next topic
July 10, 2015, 08:54:55 AM Last Edit: July 10, 2015, 10:21:37 AM by aLinktotheNothing
Okay, so I have a few questions I need to ask for my project...
1. How do I make a title screen with a new and continue button? (Because following the tutorial caused my game to never load... I need this fixed...)
2. How do I add music to the title screen?
3. How do I add a background to my title screen?
4. How do I make a sword and change it's damage?
5. How do I make an NPC walk?

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! :)

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. ???

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. ;)
SQE developer

Wow, I had no idea this had so much to do with API. O_o
Look how violent my profile picture is compared to yours...

Solarus is all about Lua scripting. As I explain in the very first tutorial, I would not recommend it to non programmers. There are other game creation software without programming needed, like Game Maker, Multimedia Fusion or Zelda Classic.

Aw, I want an action RPG game creator that doesn't require programming.  :(

If you have a little experience with programming, regardless of script language, then you should understand Solarus Quest Editor. A lot is explained in the documentation and in the tutorials. That can be very helpful.