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 / Would like a new command..... Get object texture, object ()

Author
Message
Mark Garrett
Reviewed AGK on Steam
20
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 19th Feb 2013 06:35 Edited at: 19th Feb 2013 06:40
Get object texture, object ()

This command would be useful in a game I am working on.

This would eliminate having to make a list of all my objects and their texture numbers inside my working game program.

This would eliminate the need for my game program to scan such a list and would therefore save computer time, and make the program more efficient.
.

Man is a figment of God's imagination.
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 19th Feb 2013 06:50
Well i doubt your wish come true, for most stuff you have commands, for everything else brain(actually for some stuff there are plugins also).If you think your program do not perform well search about code optimization.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Feb 2013 06:59
LIMB TEXTURE NAME



Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Feb 2013 09:40
Mr.Valentine's suggestion will give you the name; this will give you the texture ID: LIMB TEXTURE. These commands are in the standard help files.

Good to note that limb zero is the base of the object.

Dark BASIC is used to create products such as FPS Creator; so you will find that things like getting texture IDs need to be easy and are.

Mark Garrett
Reviewed AGK on Steam
20
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 19th Feb 2013 10:50
Oh, thanks, I got it...

as expressed in the formula-

Return Integer=LIMB TEXTURE(Object Number, Limb Number)

and if the object has no limbs, just put for limb number '0'.

That way, even if there's no limbs on the object, I can still find out the texture number.

Man is a figment of God's imagination.
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Feb 2013 20:39
This is not strictly necessary, after all YOU set the texture so YOU should be able to manage the data. i.e.


Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Feb 2013 23:56
OBese87, textures are often assigned externally in a level editor or modelling program. The load object command will by default will load reconciled textures in the model folder and assign them run-time IDs.

The only reason to use Texture Object/Limb commands is when the model is untextured, insufficiently textured or needs overriding.

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Feb 2013 15:12
@Chris
I take it back then, I thought you guys were promoting clever lazy tricks above managing data properly.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Feb 2013 15:16
Quote: "I take it back then, I thought you guys were promoting clever lazy tricks above managing data properly."


I wouldn't exactly call it "lazy". If a data management system is already built in, there's really no need to re-invent the wheel unless you need it to be more specific.

TheComet

http://blankflankstudios.tumblr.com/
"You're all wrong. You're all idiots." - Fluffy Rabbit
"Bottom line, people are retarded." - Fluffy Rabbit

Login to post a reply

Server time is: 2026-07-07 18:44:50
Your offset time is: 2026-07-07 18:44:50