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 / Not consistantly loading an object...

Author
Message
Cruise McClarren
20
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 10th Nov 2011 00:59
I am running a simple program and even though I don't change anything at all. If I run the program one time it loads fine. Then I can stop it and run it again. When I do I get an error that it can't load the object. What doesn't make sense is that it loaded it just fine only a moment ago.
The code and media I am using can be found here

http://forum.thegamecreators.com/?m=forum_view&t=191175&b=30

(I didn't want to post the same code twice.)

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 10th Nov 2011 02:09
Have you tried converting the object to a .DBO object and running the program again? It might be some sort of anomaly in the .x file.

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 10th Nov 2011 04:03
I tried your code and never got a problem.

Quote: "How do I keep my 'player' inside the map and not fall through the floor?"


this is because the terrain object beign put at y>60. get back to your design software and place it at y=0 for the floor, so results will be predictable.

Quote: "SELECT MOUSECLICK()
CASE 1: `move forward
PHY MOVE CHARACTER CONTROLLER playerobj, 0.1
MOVE OBJECT playerobj,0.1
ENDCASE

CASE 2: `move backward
PHY MOVE CHARACTER CONTROLLER playerobj, -0.1
MOVE OBJECT playerobj,-0.1
ENDCASE

CASE DEFAULT: `don't move at all
PHY MOVE CHARACTER CONTROLLER playerobj, 0.0
MOVE OBJECT playerobj,0.0
ENDCASE
ENDSELECT "

better option:
Quote: "PHY MOVE CHARACTER CONTROLLER playerobj,((MOUSECLICK()=1)-(MOUSECLICK()=2))*50"


Quote: "about the speed:"

use: sync on : sync rate 60 so you can use human eye speed and natural human movement.
move_speed= 50 to 60

I wrote the code for you again:

I wrote the code again
Cruise McClarren
20
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 10th Nov 2011 08:52
@basjak:

Thank you it works fine now. With one exception. I converted the x file to a dbo format and the textures are not there. All i get is brown walls and no ceiling or floor. How do I fix that? Thanks again!!

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 10th Nov 2011 10:20
I don't know why this is happened but you don't have to convert your object to .dbo.
Cruise McClarren
20
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 10th Nov 2011 20:07
I had to do it because I keep getting the error message "Cannot load 3D object at line..." when I use the .x file. I've never had this problem before and I don't know why it's happening now. I even went back in to 3DWS and re-exported it as a new .x file in case the original one was messed up. But I still have this problem and I can't figure out why. I'm gonna go back and start from scratch with a model and see if I still have the same problem. I'll let you know. Thanks again.

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 10th Nov 2011 22:10 Edited at: 12th Nov 2011 04:46
your model worked fine with me. must be another problem such as running another program so used memory is almost full !!!.
Daniel wright 2311
User Banned
Posted: 10th Nov 2011 22:30 Edited at: 10th Nov 2011 22:31
If object exsist(e)=0 then load object e

If you delete all of objects e all at once and set there death to 0 then you delete them from the program there not there, at all right?

So then first delete them, then call them back in as if object exsist(e)=0 or what ever you objects numbers are.

my signature keeps being erased by a mod So this is my new signature.
madmaz
17
Years of Service
User Offline
Joined: 14th Mar 2009
Location:
Posted: 11th Nov 2011 11:02
I have had this problem before, it seemed that to fix it I had to write "Object_name.X" with the x in Caps. It worked for me when I had that problem.

Good luck

Programing is not as easy as it seems at first... the learning is never really over...

Login to post a reply

Server time is: 2026-07-10 01:59:03
Your offset time is: 2026-07-10 01:59:03