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.

Newcomers DBPro Corner / help me with this code please.....

Author
Message
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 15th Dec 2003 06:48 Edited at: 15th Dec 2003 06:48
why dosn't this code work? i am making it as a level for a game i am writing and for some reason, it will do the first line correctly, but will screw up the rest of them......any help would be much appreciated.....thanx in advance

Bishop



"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Mougli
20
Years of Service
User Offline
Joined: 10th Dec 2003
Location: United Kingdom
Posted: 15th Dec 2003 10:44
Hmm dont know if this will work but try changing:

x=30
z=10

to

z=10
x=30

then at the bottom change the next x & next z around

i probably wrong but it loooks as though your reading the first 10 parts of the data and then changing. (might not work - im not v.good with data commands)

Is the glass half empty - or half full?

You thought bubbles was a monkey? - well she is my banana ...
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 16th Dec 2003 01:45
no that didn't work.....thanks for the reply anyway

anyone else have any input?

Bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 16th Dec 2003 02:21
I can't test this particular theory out at this point, but I think your problem lies in not giving big enough spaces for your environment. For instance:

if level=1
obj=obj+1
make object plain obj,1,1
xrotate object obj,90
fix object pivot obj
texture object obj,20
set object collision off obj
position object obj,(x*10),0,(z*10)
endif

instead of the stuff you had. Try experimenting with values until you get the results you want.

That's a minor detail, however. Other than that, I do not use DBPro and don't fully understand how the collision syntax works. I have a bad feeling there is a problem with your collision syntax, and I can't really help you with that.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
DaZMaN_YM
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: CyberSherwoodForest, Nottingham
Posted: 16th Dec 2003 02:52 Edited at: 16th Dec 2003 02:53
Hi Bishop,

The problem is indeed with the loop, but Mougli didn't quite give you the right answer (very close tho Mougli, nice try mate ). Basically, this is your loop with the code replaced with a comment:

for x=0 to 30
for z=0 to 10

Rem Do some Dark Basic Stuff

next x
next z

You basically need to switch the Next statements around, like this:

next z
next x

Don't change the loop figures, just make sure you call next z before next x. It isn't doing more than one line because X reaches 30 before Z even gets off the mark from 0...

Darren.
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 16th Dec 2003 03:26 Edited at: 16th Dec 2003 03:26
thanks for the help, but it dosn't seem to work.....i have uploaded the entire code that i am using, as is....thanks you guys so much for helping me

Bishop

btw- don't know if it matters, but i am using DBC

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
DaZMaN_YM
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: CyberSherwoodForest, Nottingham
Posted: 16th Dec 2003 03:44
Hi Bishop,

That's odd - the loop should definitely work with that change. I only have DBP, so I'm not sure about the DBC thing. When you say you've uploaded all of your code, do you mean in the code snippet above? I ask because I see you calling Texture Object, but I don't see any code to load the images you're texturing with.

If you can provide the whole code + resources I would be happy to take a look?

Cheers,
Darren.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 16th Dec 2003 03:50
you have 30 elements per line in your data.
yet your loop is counting from 0-30 which is 31 elements
hence, everything is shifted

same goes for z 0 to 10 = 11 elements

start your x at 1 or end at 29
start your z at 1 or end ar 9

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 16th Dec 2003 04:02
BTW,
I for some reason I had to swap the X and the Z order in the loop. I'm not a 3d person and I had to REM out your textures so I can't fully see the effect you are going for. Someone who does 3d can probably elaborate on why the ordering is important. The other thing that I noticed was that the level image cam out upside-down compared to the data. I am figuring that this is do to the object position command parameters. Here is the code with the textures commented out.


zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 16th Dec 2003 04:06
Under DBC this code output now looks right (except for it being inverted as mentioned above). Doesn't look right under DBPRO.

Jaze
21
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 16th Dec 2003 11:45
I don't know what that is supposed to be - all code snips lead to some osrt of 2d thingy I can scroll... in front of the typical blue screen..... whatever the "levels" do or whatever - I can't even begin to figure out what this is supposed to be.

It scrolls though


-=/Jaze/=-
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 16th Dec 2003 22:04
thank you everybody, the code is fixed!!!!

thanks zenassem!!!! when i uploaded you code, i unremed all the textures and it worked well!!!! your all going to be in the credits when i get this game produced

thanx again

Bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 16th Dec 2003 22:09 Edited at: 16th Dec 2003 22:28
btw DaZMaN_YM and mougli, i think you guys were right about the loop, i just didn't do what you told me correctly....thanks alot guys!!

and to anybody who gave a shot at it

Bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."

Login to post a reply

Server time is: 2024-11-25 20:38:37
Your offset time is: 2024-11-25 20:38:37