Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Getting the texture image number from an object..

Author
Message
Chiblue
16
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 11th Aug 2010 19:58
Is there a way that I can get the image number for a texture that is applied to an object?

like... dbGetObjectTexture()????
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 20:05
Theres one that returns the texture on the limb, but none for the actual object( that i can see ) which seems pretty stupid.

=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 11th Aug 2010 20:08
If you have assigned an object a texture from an image, can you not just keep this information in an array, and refer back to it?

Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 11th Aug 2010 20:34
If you only have a single texture for an object, would you not be able to get the texture number from any limb? Even an object with only one "limb" would have a limb count of 1.

The fastest code is the code never written.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Aug 2010 21:13
Quote: "Theres one that returns the texture on the limb, but none for the actual object( that i can see ) which seems pretty stupid."

... unless you realise that objects are not textured, but limbs are. I know that there's a TEXTURE OBJECT command, but what that actually does is texture all of the limbs of the object with the same texture ID.

Also, if you texture all of the limbs on your object with different textures, then which one should be reported if you ask for the object texture anyway?

Not quite so stupid, huh?

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Aug 2010 21:18
Not stupid at all seems i'm the stupid one x'D

Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 11th Aug 2010 21:20
Well, the root limb is limb zero.

This works fine...



Login to post a reply

Server time is: 2026-07-25 07:02:11
Your offset time is: 2026-07-25 07:02:11