Jump to content
tommysticks

Player Model Textures

Recommended Posts

Anyone know if we can access player model textures through Lua?

 

I was able to access weapon textures through it, pretty sure I can change them in-game but haven't tried it yet. I just don't know how to access player textures.

 

I am able to access the weapon texture through this line:

pWorTe = player:getPrimaryHandItem():getWorldTexture();

This returns the following for example:

media/inventory/world/WItem_Fork.png

 

This leads me to believe I could change that in-game as long as a new texture was loaded. Haven't tested this yet, but I will today.

 

Still would like some advice on how to access player model texture.
 

Share this post


Link to post
Share on other sites

Anyone know if we can access player model textures through Lua?

I was able to access weapon textures through it, pretty sure I can change them in-game but haven't tried it yet. I just don't know how to access player textures.

I am able to access the weapon texture through this line:

pWorTe = player:getPrimaryHandItem():getWorldTexture();
This returns the following for example:

media/inventory/world/WItem_Fork.png

This leads me to believe I could change that in-game as long as a new texture was loaded. Haven't tested this yet, but I will today.

Still would like some advice on how to access player model texture.

I don't know if you still need help with this, but the way player models/textures are handled is a bit janky, so I don't think its possible as of now. Your best bet is to bother Jab to include support for it in his ModelLoader.

Share this post


Link to post
Share on other sites

Decompiled stuff:
 

  C:\Users\EG\Desktop\zombie\characters\IsoGameCharacter.java (1 hit)
Line 201:     public ModelInstance getModel()
 
There is also a setModel() function. Didn't notice it earlier.
 
It's also in the updated Javadoc Kirrus and I put up (which I now can't find . . . ).

Share this post


Link to post
Share on other sites

 

Decompiled stuff:

 

  C:\Users\EG\Desktop\zombie\characters\IsoGameCharacter.java (1 hit)
Line 201:     public ModelInstance getModel()
 
There is also a setModel() function. Didn't notice it earlier.
 
It's also in the updated Javadoc Kirrus and I put up (which I now can't find . . . ).

 

Found it here. Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...