View Full Version : Getting TextureType from a trace?

26-04-2016, 01:04 PM
I'm making a snippet that requires me to get the texturetype of the surface hit by a trace, and all I can find in the docs is the TextureType enum and g_Utility.TraceTexture which gets the textureNAME.

Is this even possible? D:

26-04-2016, 01:14 PM
I don't think it's possible to do that through the API. You can check for material prefixes in the texture name, but that's only for custom textures.

It might be good enough to copy the default materials file into the scripts directory. That way you can parse it and compare texture names. I doubt that file will change much between SC versions. The downside is that custom materials files will also need to be copied on a per-map basis, which is a problem for plugins.

26-04-2016, 01:41 PM
Darn it D:

Yeah I suppose that could be done :o Thanks! :D

26-04-2016, 01:48 PM
That sort of stuff is easy to add to the API.