Page 2 of 169

Posted: Tue Feb 05, 2013 14:45
by PilzAdam
Likwid H-Craft wrote:How do I make the, Version hidden, and change it?

And can I make Mouse 2 Click to do something just for, one item in the init.lua?
1st: Please dont double post.
2nd: http://forum.minetest.net/viewtopic.php?id=4483
3rd: Do you mean doubleclick?

Posted: Wed Feb 06, 2013 15:09
by Likwid H-Craft
Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?

Posted: Wed Feb 06, 2013 16:13
by PilzAdam
Likwid H-Craft wrote:Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?
Add the background element to the players formspec.

Posted: Wed Feb 06, 2013 18:20
by Likwid H-Craft
PilzAdam wrote:
Likwid H-Craft wrote:Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?
Add the background element to the players formspec.
So how do I put the img make, it work?

Posted: Wed Feb 06, 2013 18:32
by pandaro
there is a way to know the position of a player whose name I know?

Posted: Wed Feb 06, 2013 18:39
by Traxie21
Like this:

Code: Select all

local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
That ought to work, havn't tested it. Try it yourself :3

Posted: Wed Feb 06, 2013 18:52
by pandaro
local position = minetest.env:get_player_by_name(name):getpos()
print(tostring(position))
d'oh!
was so simple...

Posted: Wed Feb 06, 2013 19:08
by Likwid H-Craft
How do I remove this see though, so I can have it just a, table.
Image

I don't like it be color I just like it be allowed, to see the block under it, and all around like glass, works. unless that what I do, I use the the Glass Code.

Posted: Wed Feb 06, 2013 20:26
by Traxie21
Topic: How does one use a string variable to refrence a table in ipairs() [ or any other thing for that matter]

Reason: I have multiple tables which are refrenced by string variables that I need to be able to use. (Ranks module for ServerXtended)

EG:

Code: Select all

t = {steve="steve"}

tablename = "t"

for i,v in ipairs(tablename) do print(v) end
More Info: I've tried but I can't seem to make it work.

Posted: Wed Feb 06, 2013 20:27
by PilzAdam
Traxie21 wrote:Topic: How does one use a string variable to refrence a table in ipairs() [ or any other thing for that matter]

Reason: I have multiple tables which are refrenced by string variables that I need to be able to use. (Ranks module for ServerXtended)

EG:

Code: Select all

t = {steve="steve"}

tablename = "t"

for i,v in ipairs(tablename) do print(v) end
More Info: I've tried but I can't seem to make it work.
Use

Code: Select all

for field_name, field_value in pairs(table)

Posted: Wed Feb 06, 2013 20:31
by Traxie21
Erm, I don't see how that will help here.

The error I get is this:
bad argument #1 to 'pairs' table expected, got nil

Posted: Wed Feb 06, 2013 20:33
by PilzAdam
Traxie21 wrote:Erm, I don't see how that will help here.

The error I get is this:
bad argument #1 to 'pairs' table expected, got nil
Oh, sorry, I havent read the whole question. You have to use pairs() to access fields that are not indexed by integers.
And you have to pass the table and not a string with the name to pairs() or ipairs(). AFAIK you cant convert a string to a variable name in Lua.

Posted: Wed Feb 06, 2013 20:37
by Traxie21
Not Good.... Now I have to rethink the whole format I have been saving this in...

EDIT: Got some help on IRC:

Code: Select all

Admins = { 

privs = { 
"se_admin=true", "se_player=true", "homes=true" 
} 

}

group = "Admins"

--print(tostring(_G[group])) Works properly, gives me the table ID.

print(tostring(_G[group..'["privs"]']))

That ought to give me the table ID. But no, still returns nil. Can someone help me use that to print a table within a table?

Posted: Thu Feb 07, 2013 22:33
by Evergreen
Can anyone tell me how to make the texture not change random colors? It's really annoying.

Posted: Fri Feb 08, 2013 01:33
by sdzen
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
Well evergreen try turning off shaders apparently that can cause issues of this variety.

Posted: Fri Feb 08, 2013 02:10
by jojoa1997
you could make it check every server-step and if the privs are not right then have it set the privs

Posted: Fri Feb 08, 2013 16:38
by PilzAdam
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.

Posted: Fri Feb 08, 2013 17:45
by Evergreen
PilzAdam wrote:
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
That isn't what happened, it looks fine until I place a bunch next to each other.

Posted: Fri Feb 08, 2013 17:51
by Evergreen
PilzAdam wrote:
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.

Posted: Fri Feb 08, 2013 17:54
by PilzAdam
Evergreen wrote:
PilzAdam wrote:
Evergreen wrote:Can anyone tell me how to make the texture not change random colors? It's really annoying.
The engine uses a random color if the texture isnt found.
Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Screenshot?

Posted: Fri Feb 08, 2013 19:00
by Topywo
Evergreen wrote:Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Did you disable the texture atlas in your minetest.conf? If I don't, on redcrab my cacti-block Oracle get yellow stripes.

enable_texture_atlas = false

Posted: Fri Feb 08, 2013 23:22
by ArcticStorm
question: what program do you recommend to make a mod with?
reason: I wanna try to make mods. :)
more info: i'm using windows 7.

Posted: Fri Feb 08, 2013 23:29
by VanessaE
All you need is a good text editor, preferably one with Lua-specific syntax highlighting, good coding skills in general, the Minetest modding API, and one of the various Lua tutorials out there.

Posted: Sat Feb 09, 2013 01:46
by Evergreen
Topywo wrote:
Evergreen wrote:Try the Moreblocks mod and try and build something large with it. Then you will see what I mean.
Did you disable the texture atlas in your minetest.conf? If I don't, on redcrab my cacti-block Oracle get yellow stripes.

enable_texture_atlas = false
Thanks! :D

Posted: Sat Feb 09, 2013 10:59
by pandaro
someone has already done an anvil? I find in that mod?