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 Discussion / Loading my own media

Author
Message
Yodaman Jer
User Banned
Posted: 30th Oct 2007 19:36 Edited at: 30th Oct 2007 19:36
Sorry, I tried searching the forums, but I couldn't find a solution to my problem.

Why Can't I load any of my own media? I tried loading an .x file, a .bmp, and a .3ds file, (all at seperate coding sessions), and nothing happened. I kept getting error messages that read:

ERROR AT LINE X: FILE DOES NOT EXIST


Why? I even tried including the file path, and it did not work. I'm
sorry to be posting about something thats probably been posted SOO many times before, but I can't find anything about it anywhere.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 30th Oct 2007 19:42
can you post the code you're using?

are you sure you're including the path correctly, or that you have the file extensions right?

Yodaman Jer
User Banned
Posted: 30th Oct 2007 21:25 Edited at: 30th Oct 2007 21:28
Well, it's something like this:


For an .X file:



For Using a file path:



Does anything look like it's out of order?
Thanks for your help!
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 30th Oct 2007 21:28 Edited at: 30th Oct 2007 21:29
The problem you have is the " in the worng place.
Rather than Load Object Load Object "Matrix" .x 1
You should have Load Object "Matrix.x",1
It is also worth noting that " start before file paths, as well.

Nya!
Well, yes but - wait, what?
Yodaman Jer
User Banned
Posted: 30th Oct 2007 21:35
Still didn't work!!



I tried giving it an object number too, but still couldn't get it. It said "SYNTAX ERROR: UNKNOWN COMMAND". I double checked to make sure the file path was right, which it was, so I'm at a total loss here.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 30th Oct 2007 21:36 Edited at: 30th Oct 2007 21:36
Load object "C:\Documents and Settings\Jeremy\Desktop\thing.3ds",1

don't have any spaces in the path. You need an object number. Look at how I've put the speech marks around it as well.

Yodaman Jer
User Banned
Posted: 30th Oct 2007 21:46
Thank you so much!! It worked perfectly!
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 30th Oct 2007 22:07
Hehe no worries mate. It takes a while to get used to this sort of thing. Still not got a clue how to do it in languages other than DarkBASIC though I'm useless at coding luckily I started when I was about 13 so I had about a year of kind of learning before I got into the whole getting wasted scene - i think my brain's too fried to learn anything else now...

Yodaman Jer
User Banned
Posted: 31st Oct 2007 02:21 Edited at: 31st Oct 2007 02:48
Problem that is related, yet un-related:

I successfully made my own level (in the .X format so that the textures would be stored, gotta love that) using Blender 3D, and successfully loaded it into DB, but it's orientation is off on the Y axis! And every time I try to use the YRotate command, my Object mysteriously disappears!

Here's the code, without the YRotate command, considering that didn't work:


I'd post a screen shot of what it looks like in DB, but I can't until I make an account on Photo bucket.

EDIT: Here it is, hopefully.



Yes, I know I have the original SMB brick texture, but it's the only texture that looked good for that, I'll replce it with something else in the actual game.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 31st Oct 2007 03:24
You need to rotate it around the X axis - not the Y. When rotating objects, here's something to help you remember:

X Axis

Imagine the accellerator grip on a motorcycle. You can turn it towards you or away from you. This is rotation on the X axis.

Y Axis:

Imagine a vertical flag pole in a hole on a golf course. If you grab the pole and turn it, you are turning it on the Y axis.

Note: When you turn the object in your program, the polygons on the reverse side are not drawn (culled) and you don't see them - that's why it seems to disappear.

Z Axis

Think of a car steering wheel. Turning it left or right is turning it on the Z axis.

If you remember these three objects - Motorcycle (X), Flag Pole (Y) and Car (Z) you should easily be able to remember which axis to turn your objects.

TDK_Man

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 31st Oct 2007 03:26
You need to rotate it around the X axis - not the Y. When rotating objects, here's something to help you remember:

X Axis

Imagine the accellerator grip on a motorcycle. You can turn it towards you or away from you. This is rotation on the X axis.

Y Axis:

Imagine a vertical flag pole in a hole on a golf course. If you grab the pole and turn it, you are turning it on the Y axis.

Note: When you turn the object in your program, the polygons on the reverse side are not drawn (culled) and you don't see them - that's why it seems to disappear.

Z Axis


Think of a car steering wheel. Turning it left or right is turning it on the Z axis.

If you remember these three objects - Motorcycle (X), Flag Pole (Y) and Car (Z) you should easily be able to remember which axis to turn your objects.

TDK_Man

Yodaman Jer
User Banned
Posted: 31st Oct 2007 15:34 Edited at: 31st Oct 2007 15:35
Quote: "Note: When you turn the object in your program, the polygons on the reverse side are not drawn (culled) and you don't see them - that's why it seems to disappear."


How do I fix this? By the way, I tried the XRotate command and it still didn't work. EDIT: Never mind, turned out I was hitting an extra number, thus turning it too many degrees.
Yodaman Jer
User Banned
Posted: 31st Oct 2007 15:59
From This:



To This:



Thanks for your help every body!
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Nov 2007 01:09
Quote: "How do I fix this?"


Check out the Set Object command in the help files.

TDK_Man

demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 1st Nov 2007 01:27
Quote: "Check out the Set Object command in the help files."


Check out TDK, solving everyone's problems at once. What a machine.

Login to post a reply

Server time is: 2025-05-31 20:32:09
Your offset time is: 2025-05-31 20:32:09