LUA code questions

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Mon Nov 04, 2013 03:32

brunob.santos wrote:I'm learning.

Because I could not put the music on the node?
The music in this folder of the mod in "sounds".
Can you explain how?

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
-- mods/caixa/init.lua

minetest.register_node("caixa:caixa", {
    description = "Caixa",
    tiles = {"caixa_simples.png"},
    is_ground_content = true,
    groups = {cracky=3, stone=1},
    drop = 'caixa:caixa',
    legacy_mineral = true,
    sounds = musica_caixa.ogg,
})



i think sounds needs registered sound tables - look in functions.lua in default
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Fri Nov 15, 2013 23:27

any idea if you can make a tool that has twice the range of a normal tool?
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Fri Nov 15, 2013 23:36

wcwyes wrote:any idea if you can make a tool that has twice the range of a normal tool?

range = 8,
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Fri Nov 15, 2013 23:37

Dan Duncombe wrote:
wcwyes wrote:any idea if you can make a tool that has twice the range of a normal tool?

range = 8,
tried it doesn't seem to affect anything
NOTE:I'm using 4.7, could that have any effect?
Last edited by wcwyes on Fri Nov 15, 2013 23:38, edited 1 time in total.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sat Nov 16, 2013 03:05

wcwyes wrote:
Dan Duncombe wrote:
wcwyes wrote:any idea if you can make a tool that has twice the range of a normal tool?

range = 8,
tried it doesn't seem to affect anything
NOTE:I'm using 4.7, could that have any effect?
stable or dev?
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sat Nov 16, 2013 04:34

Evergreen wrote:
wcwyes wrote:
Dan Duncombe wrote:range = 8,
tried it doesn't seem to affect anything
NOTE:I'm using 4.7, could that have any effect?
stable or dev?

Stable
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Sat Nov 16, 2013 07:09

I think that command requires the dev version.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Nov 16, 2013 10:42

LionsDen wrote:I think that command requires the dev version.

Yep.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sat Nov 16, 2013 15:09

LionsDen wrote:I think that command requires the dev version.

any other ideas?
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Sat Nov 16, 2013 18:25

wcwyes wrote:
LionsDen wrote:I think that command requires the dev version.

any other ideas?


Only just to download the dev version and start building for that. That way, you will have a mod ready for when v0.4.8 goes live.

EDIT: And people that are playing with the dev version would be able to play with your mod until then.
Last edited by LionsDen on Sat Nov 16, 2013 18:25, edited 1 time in total.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sat Nov 16, 2013 20:33

LionsDen wrote:
wcwyes wrote:
LionsDen wrote:I think that command requires the dev version.

any other ideas?


Only just to download the dev version and start building for that. That way, you will have a mod ready for when v0.4.8 goes live.

EDIT: And people that are playing with the dev version would be able to play with your mod until then.

1.I'm mainly modding for the server I admin on, so it's not up to me to make things happen only the order they happen in. I have 4 active modding projects 1 which has been released to the public.
2. I have a project list of 19 mods, some of which I hope to delay until 4.8. But none the less I want to actively be working on a project.
3. Do you have any idea the time frame that v0.4.8 will go live.
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Sat Nov 16, 2013 23:48

No one knows when v0.4.8 will go live. I have heard some speculate maybe December but I wouldn't be too hopeful about it because it was just speculation. :)
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sat Nov 16, 2013 23:53

LionsDen wrote:No one knows when v0.4.8 will go live. I have heard some speculate maybe December but I wouldn't be too hopeful about it because it was just speculation. :)

Hope and speculation are better than nothing.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: LUA code questions

by wcwyes » Thu Jan 29, 2015 05:18

what's the best way to attack making locked versions of several items in a mod?
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: LUA code questions

by TenPlus1 » Thu Jan 29, 2015 08:50

wcwyes, check the homedecor mod as Vanessa has both normal and locked versions of many items which use the same procedure you're looking for...
 

Previous

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 3 guests

cron