How to check if..

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

How to check if..

by Jordach » Sat Apr 14, 2012 10:13

There is "air" or "CONTENT_IGNORE?" above a node?

I am attempting ti work out some clever nodal work and I need to check the above node to make sure that the lower node changes too, this is FOR ANY NODE, NOT JUST "default:dirt_with_grass" maybe al types of nodes, except signs, torches, apples, maybe others, but I need help with this.

This also MUST have a height check to make sure it is above ground, I don't want it to happen where it is covered over.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Apr 14, 2012 10:47

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
pos= {x=x,y=y+1,z=z}
n = minetest.env:get_node(pos)
if n.name == "air" then
  print "Air"
end
if n.name == "ignore" then
  print "Ignore"
end
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sat Apr 14, 2012 12:00

Ah. My mistake.

Time to make a PERFECTED Snow mod.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 13 guests

cron