Hybrid Dog wrote:v is a table which means it's a reference to it l think
and the value of v is this reference, isn't it?
so if a field of v gets changed somehow, there's no difference if v was evaluated only once or more times, is it?
a.b.c.d:func()a.b.c.d.func(a.b.c.d)somefile:read():sub(...)kaeza wrote:Now think about things like this: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
somefile:read():sub(...)
local txt = somefile.read(somefile)
txt.sub(txt, ...)TortueGaming wrote:but I don't know how to fill in "definition".
-- small algorithm to detect generation jungles.
minetest.register_on_generated(function(minp, maxp, seed)
-- check height
if maxp.y < 10 or minp.y > 90 then return end
-- center pos
local cp = vector.add(minp, 40)
-- load map
minetest.get_voxel_manip():read_from_map(minp, maxp)
-- search jungle tree
if minetest.find_node_near(cp, 40, {"default:jungletree"}) == nil then return end
-- More code ...
end)
ErrorNull wrote:Topic: Immediately halting player's movement
I'm making a mod that needs to freeze a player's movement immediately upon a timer hitting zero. However, I've found that if the player happens do be moving at that moment (up/down/left/right movement key pressed down) and when my timer hits zero.. player:set_physics_override({speed=0}) ...does not register until AFTER the player releases the input... resulting in the player sliding/gliding indefinitely until hitting an obstacle or dropping down a node.
If player was not moving at the time my timer hits, player:set_physics_override({speed=0}) functions as expected and player can longer move.
Is there anything I can do to remedy this? Is there a way to block or ignore player input?
iangp wrote:Have you tried treat the player as a entity, SAO object ? (I dunno the right terminology)...
player:setacceleration({x=0, y=0, z=0})
player:setvelocity({x=0, y=0, z=0})
MineYoshi wrote:A simple question, how to make when i eat, by example: "test:test_food" give me a text, heal me and be replaced by another item???
xeranas wrote:How I can reset player skybox to default server? I want temporally change user skybox and then return to 'normal'.
minetest.register_node("usable_decor:cabnet", {
description = "Wood Cabnet",
drawtype = "mesh",
mesh = "usable_decor_cabnet.b3d",
tiles = {"usable_decore_cabnet.png", "usable_decore_cabnet.png"}
})benrob0329 wrote:...
Any ideas as to why its black when placed, but not when wielded?
benrob0329 wrote:That worked, now I just have to figure out how to import a b3d back into Blender because I forgot to save it as a blend too...
sofar wrote:benrob0329 wrote:That worked, now I just have to figure out how to import a b3d back into Blender because I forgot to save it as a blend too...
If it's not animated, make it an .obj file instead (waveform object). Those can be directly opened by blender.
benrob0329 wrote:sofar wrote:benrob0329 wrote:That worked, now I just have to figure out how to import a b3d back into Blender because I forgot to save it as a blend too...
If it's not animated, make it an .obj file instead (waveform object). Those can be directly opened by blender.
That helped get rid of some weird UV distortion as well, though now I have weird connected vertices...
EDIT: Never mind, figured it out.
benrob0329 wrote:Everything should be lining up perfectly:
But its not...
Users browsing this forum: No registered users and 4 guests