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 / DBC vs DBP loading .X objects ??

Author
Message
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 14th Mar 2010 23:33
ok, i have an object i need to load into my DBP game. the model works. it loads fine in DBC, but in DBP i get an error about "file does not exist"

i think i properly loaded it into the DBP project, but im not sure. i just went and hit "import" on the media tab on the box on the left side of the editor and found the file, then it copied into the project folder

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Mar 2010 23:41 Edited at: 15th Mar 2010 00:07
Nevermind.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 15th Mar 2010 00:42 Edited at: 15th Mar 2010 00:42
Can I see your code or some media?

Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 15th Mar 2010 03:34
I don't really use the default IDE, but it sounds like it's looking in the .x file's old location if you hit import and then copied it into the project folder. Of course, I don't really know how the Import button works because I never use it. I just keep all of my media inside my project folders and reference them locally. I'd check to see if your model is actually where DBPro thinks it is.
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 04:53
it is, and sure ill put up the code + media here in a sec

That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 04:56
alrite heres the project folder

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Mar 2010 05:45
Is it a Dark Matter object by any chance? If so, what type of texture image is with the .X file?

Either way, you should copy both the .X file and the texture into the same folder as your project's .DBA file.

If it is a DM object and the texture file is a DDS file then the .X file may be looking for a .BMP file with the same name.

I've found that for some strange reason, DBC will look for the BMP file and automatically detect the DDS file, and use it - whereas DBPro will not.

Once I'd converted the DDS file to a BMP, DBPro was happy to load the object.

Open up the .X file and take a look what texture it's looking for.

TDK

That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 05:58 Edited at: 15th Mar 2010 17:50
ummm i havent textured it, so should it be looking 4 one? i havent made the texture yet, its my own model (which explains why it looks like poop right now)

SoftMotion3D
AGK Developer
20
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 15th Mar 2010 09:54
Quote: " $ word"
might want to remove that.....alot of kids on this site that may get offended. Including tgc....

Development & Editting
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Mar 2010 17:57
Quote: "i havent made the texture yet"


In that case, no problem. Put the .X file into the same directory as your dba file and use:

Load Object "objname.x",ObjNum

You don't need any path if the .x file is in the project's root directory.

You should also create a project file too if you haven't already done so (so it creates a .dbpro file).

No reason why that shouldn't work then.

You can worry about including it into your project with Include Media later on when you know it's loading properly.

TDK

That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 19:31
i did all that, and it isnt loading

That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 19:34
hmmmm i cant load ANY mesh right now. its not just the sniper.x model, its ANY model. i created a test mesh in DBP and saved it, then tried to load that and it says "mesh not found"

That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 19:37
ROFLMAO!!!!
i found the problem!!!

it found the FILE alright, but i was making a mesh numbered 1 from the object and trying to make a limb from mesh 2. it wasnt saying it couldnt find the file, it couldnt find the mesh!!

WOW sorry guys i am blonde

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 15th Mar 2010 19:39
Hmm, tried running your code but the compiler crashes...

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Mar 2010 23:21 Edited at: 15th Mar 2010 23:22
it doesnt for me....heres the new code





right now im trying to get the sidearm functionality to work

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 15th Mar 2010 23:39
That code fixed the compiler crashing anyways

What's the problem? The model is loading now isn't it?

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Mar 2010 05:06
right it is, like i sid in my triple post above it was a stupid blonde mistake on my part. its working now.

however do u have any idea why the side arm thing isnt working?

u should press "S" (scancode 31) and it will change the current weapon property of player(1) to the sidearm weapon, which should make it do 3% damage as opposed to the sniper's 205

Login to post a reply

Server time is: 2026-07-26 23:40:45
Your offset time is: 2026-07-26 23:40:45