I am a newbie at minetest modding (though not a newbie at Lua in general, as I have a good bit of experience with it having used multiple libraries). I cannot seem to make an entity, no matter how hard I try, and there is nowhere that I can find good documentation online to see what I am doing wrong. I have tried looking at other mods to see what strategy they take, but no cigar. I then see other people excelling at making entities and I wonder what I am doing wrong. Is it because I am using duckduckgo instead of google?
Anyways, can you please tell me what in my code is flagging errors? I have done tests by "commenting out" pieces of code and I know for certain that my attempt at registering an entity is wrong somehow. Please and thank you.
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_entity("sciencing:pug", {
hp_max = 6,
weight = 10,
physical = false,
timer=0,
visual = "sprite",
visual_size = {x=1, y=1},
textures = {"sciencing:sciencePug"},
lastpos={},
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
makes_footstep_sound = false,
automatic_rotate = false
}