ultimatemuffin wrote:Hi, I'm new to minetest, and I'm trying to write my first mod. Basically, it's a trade machine mod where the player who places it sets up what he wants to trade and what to trade for, and fills the machine's stock. When another player right clicks on it, they should see a different formspec that only shows what's being traded and a button to perform the trade.
My question is this: How do I make a node show two different formspecs to two different players when they right click on it?
prestidigitator wrote:ultimatemuffin wrote:Hi, I'm new to minetest, and I'm trying to write my first mod. Basically, it's a trade machine mod where the player who places it sets up what he wants to trade and what to trade for, and fills the machine's stock. When another player right clicks on it, they should see a different formspec that only shows what's being traded and a button to perform the trade.
My question is this: How do I make a node show two different formspecs to two different players when they right click on it?
Instead of using the node's metadata formspec like a chest does, you'll want to use a callback function (e.g. on_rightclick) to call minetest.show_formspec. That way you can vary the formspec each time a player interacts with the node.
jojoa1997 wrote:How would one make a gas rise in the air? I was thinking of something like making water with the gravity inversed or that flows upward but I do not think that is possible.
SAMIAMNOT wrote:How wwould I make blocks move? (for custom mobs)
tiles = {
{name="cubetesttop.png",backface_culling=false, animation={type="vertical_frames", aspect_w=10, aspect_h=10, length=3.0},
{name="cubetestbottom.png",backface_culling=false, animation={type="vertical_frames", aspect_w=10, aspect_h=10, length=3.0},
{name="cubetestgreen.png",backface_culling=false, animation={type="vertical_frames", aspect_w=10, aspect_h=10, length=3.0},
{name="cubetestblue.png",backface_culling=false, animation={type="vertical_frames", aspect_w=10, aspect_h=10, length=3.0},
{name="cubetestblack.png",backface_culling=false, animation={type="vertical_frames", aspect_w=10, aspect_h=10, length=3.0},
{name="cubetestred.png",backface_culling=false, animation={type="vertical_frames", aspect_w=10, aspect_h=10, length=3.0},
}
AMMOnym wrote:Is there any way, how to make a mob flying without remaking API ? (I am using simple mobs)
rubenwardy wrote:AMMOnym wrote:Is there any way, how to make a mob flying without remaking API ? (I am using simple mobs)
Simple mobs doesn't support flying animals. Only land animals. Last time I checked. You would need to edit the API.
AMMOnym wrote:spawn a node above my placed node
Achilles wrote:Has anyone ever considered making a 'PickPocket' mod?
It would encourage players not to leave their accounts idle for too long a time....
Users browsing this forum: No registered users and 17 guests