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 / to find a texture on an object ?

Author
Message
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 14th Nov 2004 01:15
is there a command to tell me what texture number is on an object?

something like :return= object size x()

but : return= object texture ()


?
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 14th Nov 2004 01:30
Dont think so..

Im mean think about it.. What would happen if you called that on a model that has been loaded as a ".X" file but you haven't loaded the image!

Its a good idea though... Why you need it?

Xander
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 14th Nov 2004 01:33
I don't know about if you load a pretextured object...but I use this command to find what texture is on an object that I manually apply a texture to in DB:

limb texture(objectnum,0)

For example:

if limb texture(objectnum,0)<>shieldimage then texture object numobject,shieldimage

I hope it helps you out

Xander Moser - Bolt Software - Firewall
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 14th Nov 2004 01:36
I can see what you mean, but ALL of my 3d is done currently from primary objects! lol

but then again, all my code is very basic, just that I curently have about 30 plains on the screen, I can get the object number using the pick object command, but when I click the mouse I want to change the texture on that object ( each object has 2 seperate textures, one of on, one for off)
so I have 60 textures, and I want to say to inc the current texture by 1.

saves me using a for next loop, or lots of if statments
Xander
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 14th Nov 2004 03:24
So you understand that you can use the limb texture() command, right? Just do this:

texture object objectnum,limb texture(objectnum,0)+1

Or whatever. You can use the limb texture() command for what you need because you apply the texture in DB.

Xander Moser - Bolt Software - Firewall

Login to post a reply

Server time is: 2026-06-11 14:44:55
Your offset time is: 2026-06-11 14:44:55