Page 1 of 1

I have a problem with tinted glass I am working on.

PostPosted: Fri Aug 07, 2015 02:12
by Tmanyo
So I am making a skyscraper material mod. I am trying to make Black tinted glass, and I have the transparency but I can see through the map. Like I can see underground and through nodes that are right next to my glass. Does anybody know what I am doing wrong?

Here is the code:
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_node("skyscraper_material:tinted_glass", {
   description = "Black Tinted Glass",
   inventory = {"black tinted glass"},
   paramtype = "light",
   drawtype = {"glasslike"},
   use_texture_alpha = true,
   groups = {cracky=3, crumbly=1},
   tile_images = {"black_tinted_glass.png"},
   sunlight_propagates = true,
   inventory_image = minetest.inventorycube("black_tinted_glass.png"),
})


Please note that I am not a good person at coding. I have only made 1 successful mod so far. Please do not judge.

Re: I have a problem with tinted glass I am working on.

PostPosted: Fri Aug 07, 2015 04:32
by Napiophelios
I dont think there should be brackets around--> drawtype="glasslike",
and if you use "glasslike" drawtype, I dont think you need--> use_texture_alpha = true,
Anytime I have ever used this I get the weird xray effect.

Re: I have a problem with tinted glass I am working on.

PostPosted: Sat Aug 08, 2015 01:23
by Tmanyo
Thank you for your suggestions. I used 1 of them and found the other one made it worse but thank you anyway, I finally figured it out.

Re: I have a problem with tinted glass I am working on.

PostPosted: Sat Aug 08, 2015 03:39
by Napiophelios
Sorry I couldnt help.

I think 'use_texture_alpha = true' is no longer nessesary
I think if the file already has opacity the game engine uses it.
I could be wrong though :)

Re: I have a problem with tinted glass I am working on.

PostPosted: Sat Aug 08, 2015 14:56
by Tmanyo
Napiophelios wrote:Sorry I couldnt help.

I think 'use_texture_alpha = true' is no longer nessesary
I think if the file already has opacity the game engine uses it.
I could be wrong though :)


I removed the brackets around the drawtype but i found that use_texture_alpha needed to be there.