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 / Positioning some boxes...

Author
Message
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Oct 2004 05:11 Edited at: 13th Oct 2004 05:50
Hi, it's me, Animeblood.
I have a world that I need to be border by some giant walls that cover the hole perimeter using some boxes (or plains, which ever works), I don't want any of the world to be cut off though.
Here is the code that makes my world (it's a just box moved down for now)
The Code:

I need the walls to surround each side so you can't see the backdrop, so it looks like an arena that you can't get out off, any help would be great, I'v tried positioning it for about 1 hour and I've had no look, I've gotten them to surround like a box with an open top but massice portions of the field were cut off, of course since there is no collision with the walls yet I could still get to them, but I won't be able to in the final thing, I would like each wall to be labeled :
101
102
103
104
Thanks in advance again...
Edit:Posted the wrong sizes for the field origanlly.

There is only one way to package shaolin: Shaolin Soccer...
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 13th Oct 2004 06:21
move object down 100,10

isn`t a legal command, you can only

pitch object down 100,10

that will tilt it, not move it, you mean

position object 100,0,-10,100

you just need to make four boxes that measure 5000 long, then you position two like this

position object 101,0,0,2500
position object 102,0,0,-2500

then you need to turn two of the wals through 90degrees to get them at right angles to the current walls, and position them on the other axis, like this

turn object left 103,90
turn object left 104,90
position object 103,2500,0,0
position object 104,-2500,0,0

and you have the plain surrounded, remember that the position of an object is at 0,0,0 when it is created, and the positioning is calculated from the middle of the object you create, heres a simple example of the enclosed arena, cheers.




Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Oct 2004 06:26
Actually Mentor it works and all it is doing is moving it down a bit.
But thanks for the code, it works perfectly. I might have a question about some problems I'm having with collision so don't leave this thing for dead!

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Oct 2004 06:38
Okay! I have a collision problem, for some reason neither my player objet or enemy will collide with the wall, they just go through it, here's my code:


Why doesn't it work?

There is only one way to package shaolin: Shaolin Soccer...
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 13th Oct 2004 07:19
Easy wall:
make object cube 100,0-size of level

Collision:
`init codez
make object cube num,1
set object cillision to polygons 100
set object collision to boxes 1
`loop
`b4 yur movement codez
ox=camera position x()
ox=camera position y()
ox=camera position z()
`after
position object num,camera position x(),camera position y(),camera position z()
if object collision(100,num)=1 then position camera ox,oy,oz
`end loop
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Oct 2004 07:29
Thanks for trying to help Ilya but with the way my camera works it just would be randomly placing my object because you have complete control of the camera and plus my game is third person, and also I already have the walls dealt with.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Oct 2004 10:08
Pppplllleeeeaaaasssseeee help.
I have tried to get the collision working but it refuses! It must not like me.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Oct 2004 04:44
Mentor? Ilya? Anyone? The god damn collision won't work!

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Oct 2004 08:34
I have tried everything, I tried again to get the collision again but it wouldn't work, will some one please help, I'm using a third person control scheme with which you can rotate the camera however you want, which I'm still working on because you look past walls and what not, but I need some working collision with the walls.

There is only one way to package shaolin: Shaolin Soccer...
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 14th Oct 2004 10:20
`init codez
make object cube 100,0-size of level
set object collision to polygons 100
set object collision to boxes chr num
`loop
`b4 yur movement codez
ox=object position x(chr num)
ox=object position y(chr num)
ox=object position z(chr num)
`after
if object collision(100,chr num)=1 then position object chr num,ox,oy,oz
`end loop
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Oct 2004 10:36
Thanks Ilya, it finally worked .
Your name is in the credits and so is yours Mentor!

There is only one way to package shaolin: Shaolin Soccer...

Login to post a reply

Server time is: 2024-11-27 13:05:56
Your offset time is: 2024-11-27 13:05:56