[answered] Is there a way to remove a texture?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

[answered] Is there a way to remove a texture?

Postby Matt » Wed Jun 15, 2022 1:22 pm

EDIT: texman.checkfortexture("-",texman.type_any) works. OP below.



SetTexture(side.mid,null) does not work.


EDIT: setting it to texman.checkfortexture("TNT1A0",texman.type_any) results in an all-black texture, but it can still be made invisible by alpha 0.
Last edited by Matt on Sat Jun 18, 2022 5:51 pm, edited 2 times in total.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Is there a way to remove a texture?

Postby Enjay » Wed Jun 15, 2022 3:09 pm

does - (dash) work instead of null?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Is there a way to remove a texture?

Postby 22alpha22 » Wed Jun 15, 2022 4:14 pm

I've had this problem before, what I ended up doing was just creating a "Null" texture in TEXTURES and changing the texture I wanted to remove to the "Null" texture.
User avatar
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Is there a way to remove a texture?

Postby Matt » Wed Jun 15, 2022 8:17 pm

Enjay wrote:does - (dash) work instead of null?
It does not. The only values I've tried that compile are actual CheckForTexture calls.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Is there a way to remove a texture?

Postby Blue Shadow » Wed Jun 15, 2022 9:36 pm

Matt wrote:
Enjay wrote:does - (dash) work instead of null?
It does not. The only values I've tried that compile are actual CheckForTexture calls.

Have you tried passing the dash to CheckForTextures?
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Is there a way to remove a texture?

Postby Matt » Sat Jun 18, 2022 5:50 pm

Works now, thanks!
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests