HarryDE

[HELP] Get texture names of an Object

Recommended Posts

Posted (edited)

So there is the situation:

There is a wall object that has 4 different textures applied on different side of the object and I would have to get which side of the wall the player is hovering with the cursor. Is there any solution for it?

Edited by HarryDE

Share this post


Link to post

I am afraid that it is an unsolvable question with only object. First, there is no way to get the texture from an object by position. Second, we can not get the texture from an object even you know which face of the object the mouse clicks without analyzing the dff file. But you can store the texture data in a table ....

Edited by thisdp

Share this post


Link to post

I'm not sure what he means exactly either,
But If I'm not mistaken I think he means that he wants to know which texture applies to each wall?
If you add me on something or PM me I'll help youxD

Share this post


Link to post
17 hours ago, JustinMTA said:

I'm not sure what he means exactly either,
But If I'm not mistaken I think he means that he wants to know which texture applies to each wall?
If you add me on something or PM me I'll help youxD

Sent you a PM :)

Share this post


Link to post
On 16/08/2019 at 16:32, HarryDE said:

Sent you a PM :)

Instead of sending a PM, please clarify it here in this thread, so others can help too such as myself.

 

Share this post


Link to post
6 hours ago, Tails said:

Instead of sending a PM, please clarify it here in this thread, so others can help too such as myself.

 

I explained him the problem better but actually he couldn't even help. :S

But I can copy here my explanation that I have written in my PM.

So I have a wall object that has 4 different textures. As this pictures shows: https://imgur.com/CSJBkSU ( Texture names: la_carp3, la_carp4, la_carp5, la_carp6 ) I checked them with shader_tex_names resource from MTA Wiki. But I'd have to get the name of the texture that I click on. For example, I click on the right side of the wall object then the function gives as result: la_carp3. 

Share this post


Link to post

I thought maybe he wanted the texture ID's and I was gonna use screen share to show him.
I'm not a scripter, but I just searched on the wiki when I got back on PC and found this:
ProcessLineOfSight
Not sure if it'll work though man.

Share this post


Link to post

how did you applied 4 textures on single object?

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now