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 / need help with area-zoning, and using layers for color.

Author
Message
i lyke pineconez
14
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 29th Aug 2010 06:59 Edited at: 29th Aug 2010 23:46
Aight, I got two questions here.

1) How do I check when my players collision sphere is inside a specified area (a box basically, with no Y(height in my game) restrictions.) and do something (anything) when it is. Basically here im only checking the X and Z coordinates. This is because my game is a 3D, First Person game, and Y, is actually height. X and Z would be how my player moves about the ground. I dont want to check height(Y), at all.


2) Im using 3DWS, and I need to use multiple layers for different textures on my terrain. I have done this, and now have a working, good-looking world I wish to use. However, when I export it(im using .x format), only the base layer(grass) appears, not the other layer that I have for dirt. Any ideas why this is happening?

Any help on these things is appreciated, but I mainly want #1 answered, as im sure I can find out whats causing the layer problem.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 29th Aug 2010 19:22
Quote: "How do I check when my players collision sphere is inside a specified area (a box basically, with no Y(height in my game) restrictions.) and do something (anything) when it is."

You can simply check the player's position against the boundaries of the box.

Ex:
if object position x(sphere)>left and object position x(sphere)<right and object position y(sphere)>top and object position y(sphere)<bottom then do things


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
i lyke pineconez
14
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 29th Aug 2010 23:42
I've tried that on my own, and also a form of this as stated in the help files:


And that didnt work, so.. im at a loss as to what to do here.

I'm editing my first post to show more clearly what im checking, too.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 30th Aug 2010 16:42 Edited at: 30th Aug 2010 17:27
Your problem there is that you're checking if the position is greater than everything. You need some less-thans on the larger ones.


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
RedFlames
17
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 30th Aug 2010 17:20

(they should be on the larger ones per axis, not in general )
or
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 30th Aug 2010 17:27
Ah, lol, so I see .


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
i lyke pineconez
14
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 1st Sep 2010 00:55 Edited at: 1st Sep 2010 01:01
I did use both signs as BMacZero said, and i think i've tried almost every possible combination of them as well.(didnt actually copy that from my program, i just put up a quick example of what i used)

RedFlames's example did exactly what i was looking for, but for some reason when i did mine in one line it gave me an error code on debug

Thanks alot for helping guys, it works perfectly, and now i can make my zones

Login to post a reply

Server time is: 2024-09-28 22:31:51
Your offset time is: 2024-09-28 22:31:51