param2 and paramtype2 question

Post Reply
KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

param2 and paramtype2 question

by KCoombes » Post

are these for 0.4.17+? I tried to use them using 0.4.16 but did not notice any difference in the visual display of the 'plantlike' drawtype.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: param2 and paramtype2 question

by rubenwardy » Post

Is what for 0.4.17+?
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

Re: param2 and paramtype2 question

by KCoombes » Post

drawtype = "plantlike",
param2 = 3,
paramtype2 = "meshoptions",


no change in appearance of node using these parameters

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: param2 and paramtype2 question

by sofar » Post

KCoombes wrote:drawtype = "plantlike",
param2 = 3,
paramtype2 = "meshoptions",

no change in appearance of node using these parameters
it doesn't work like that. the nodedef table API does not know about `param2`.

You can use `place_param2 = N` so that user-placed nodes get a default param2 value. Or you can modify the mod code such that `minetest.set_node(pos, {name = "nodename", param2 = N})` ...

Check out `crops` for instance:

https://github.com/minetest-mods/crops/ ... potato.lua

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

Re: param2 and paramtype2 question

by KCoombes » Post

sofar wrote:
it doesn't work like that. the nodedef table API does not know about `param2`.
Ok, so https://github.com/minetest/minetest/bl ... i.txt#L947 is incorrect - gotcha.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: param2 and paramtype2 question

by rubenwardy » Post

It's not incorrect, it just doesn't say where to put param2. That's said above: https://github.com/minetest/minetest/bl ... i.txt#L899
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: poor2affordmc999 and 17 guests