Page 1 of 1

Questions

PostPosted: Sat Dec 17, 2011 11:20
by darket
questions:
Hi all! I have a question for you.
1.How do a specific action when you press the left mouse button?
2. It is possible to make a bow??
3. May add to the game mobs like a rat? (If yes, how)
4. Is it possible to generate the houses? (If yes, how)
5.Can I make a random item when you press the left button?

PostPosted: Sat Dec 17, 2011 19:20
by MarkTraceur
1. Either minetest.register_on_punchnode (if you want to interact with a specific kind of block) or the on_use parameter to creating a craftitem (if you want to interact with a tool or item in your inventory regardless of your target).

2. Yes, please read other topics before posting new ones. http://c55.me/minetest/forum/viewtopic.php?id=584

3. Simply, yes. They wouldn't know how to pathfind, because collisions don't currently work, but you might be able to find a way to avoid nodes before they hit them.

4. Yes, using http://c55.me/minetest/forum/viewtopic.php?id=557 or similar. Read other topics, please.

5. Again, it depends on the context, but see the answer to number 1, and read the API docs for adding to a player's inventory.