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

User avatar
Tmanyo
Member
 
Posts: 196
Joined: Mon Sep 29, 2014 01:20
Location: United States
GitHub: Tmanyo
IRC: Tmanyo
In-game: tmanyo

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

by Tmanyo » Fri Aug 07, 2015 02:12

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:
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.
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
 

User avatar
Napiophelios
Member
 
Posts: 982
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Fri Aug 07, 2015 04:32

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.
 

User avatar
Tmanyo
Member
 
Posts: 196
Joined: Mon Sep 29, 2014 01:20
Location: United States
GitHub: Tmanyo
IRC: Tmanyo
In-game: tmanyo

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

by Tmanyo » Sat Aug 08, 2015 01:23

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.
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
 

User avatar
Napiophelios
Member
 
Posts: 982
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Sat Aug 08, 2015 03:39

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 :)
 

User avatar
Tmanyo
Member
 
Posts: 196
Joined: Mon Sep 29, 2014 01:20
Location: United States
GitHub: Tmanyo
IRC: Tmanyo
In-game: tmanyo

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

by Tmanyo » Sat Aug 08, 2015 14:56

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.
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 6 guests