Casimir wrote:local number = table.maxn(minetest.registered_items)
local number = #minetest.registered_items local number = 0
for name, item in pairs(minetest.registered_items) do
number = number + 1
end
philipbenr wrote:<snip>
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_craft( {
type = "shapeless",
output = "homedecor:terracotta_base 8",
recipe = {
"default:dirt",
"default:clay_lump",
"bucket:bucket_water"
},
replacements = { {"bucket:bucket_water", "bucket:bucket_empty"}, },
})
philipbenr wrote:When crafting an item, how can I get an item as an output and then have another item be put back into my inventory? I wish to craft milk in drinking glasses that uses a bucketful of milk from kpgmobs and vessels.
Sokomine wrote:philipbenr wrote:When crafting an item, how can I get an item as an output and then have another item be put back into my inventory? I wish to craft milk in drinking glasses that uses a bucketful of milk from kpgmobs and vessels.
There's a receipe (afaik in the food mod?) that uses two buckets of milk for one cheese - without returning any buckets. I'm not sure if two items may be returned simultaneously. Perhaps in such cases a special "machine" might be best. I didn't get around to give the barrels from my cottages mod any functionality yet.
leeminer wrote:I'm getting the hang of modding minetest now. I'm curious about the limits of the modding api. Can someone give me a rough idea of what is possible with the minetest api? What can and cannot be done.
player:set_physics_override({gravity=3.0})user:set_physics_override({gravity=3.0})leeminer wrote:Been banging my head for some time so here goes.
How can you access the player object in singleplayer and modify it? I am trying to modify the player object to decrease gravity or increase jump height but I get an error when I insert my code.Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
player:set_physics_override({gravity=3.0})
I also triedYour phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
user:set_physics_override({gravity=3.0})
I found info here, http://dev.minetest.net/Player, however once again I think I am missing something horribly simple and obvious. Any help would be appreciated. I want my character to jump a round like superman ;)
local player = minetest.get_player_by_name("singleplayer")
player:set_physics_override({gravity=3.0,jump=3.0,speed=3.0})leeminer wrote:Getting closer to changing the speed, gravity and jump of the player. Sooo close...
Can someone tell me why this code doesn't work? It throws a lua init error when launching the world with my mod enabled.
minetest.register_on_joinplayer(function(player)
player:set_physics_override({gravity=3.0,jump=3.0,speed=3.0})
end)
leeminer wrote:Getting a player object has failed me so far. Even with suggestions. I resorted to modifying the main config file and adjusting gravity jump etc there.
However I was wondering if there is a way to debug a script. Does anyone know how? I need more useful errors than the standard can't load the lua file.
/lua me:set_physics_override({ gravity=3, jump=3, speed=3 })
davidthecreator wrote:hi im new at this but im kinda trying to make mods and finaly im succeeded so i would like to know how to make them downloadable to others
fireuser wrote:I love with the idea of mobs, so I am trying to make some. I made models in blender, but I don't know how to use them in to the mod. I think you should use .x files ,but blender would not let me export the models as .x files.
drkwv wrote:I tried to create a first-person-shooter weapon mod https://github.com/yetanotherusernamebe ... omsdayarms using a code of cannons mod, but ran into an issue with the entities: I can shoot through walls when facing it close enough. The reason for this is the initial velocity: bullet spawns inside of a wall, gets velocity and thus not collide with it. When I set velocity to 0, bullet collides successfully. Is there an easy way to workaround this problem? Or maybe I should not use entities for bullets at all?
Evergreen wrote:Most gun mods I have seen don't use visuals for the bullet, and just use math for figuring that out.
stu wrote:Quick one, is it safe to use alpha channel for HUD images?
(by that I am referring to partial transparency)
Users browsing this forum: Bing [Bot] and 3 guests