Coordinate-Based Rooms

ac19189
15 Nov 2004, 17:44
Im sure this is a very complex script to make but im hoping someone can help me...

Does anyone have a clue how to make a script that when you type x,y or just x,y cords like /nav 123, 123 the command will take yor ship there but lets say I want a planet at 1,3....

so if you type /nav 123, 123 it will say in text theres nothing here
but if you type /nav 1,3 it says theres a planet here.....


so in simple terms I want to make a nav system so if i type
/nav 1,3 in text it says your in orbit of a planet and from that point you can land on the planet witch would be a new room

but if you type something there is nothing at like
/nav 123,156
or
/nav 157,356 or anything that the script has no planet or ship at making the disply say theres nothing here....

ehh i have no clue how much sense that made...... :?

steve the gaming guy
15 Nov 2004, 18:51
ac19189 wrote:Does anyone have a clue how to make a script that when you type x,y,z or just x,y cords like /nav 123, 123 the command will take yor ship there but lets say I want a planet at 1,3....

so if you type /nav 123, 123 it will say in text theres nothing here
but if you type /nav 1,3 it says theres a planet here.....

so in simple terms I want to make a nav system so if i type
/nav 1,3 in text it says your in orbit of a planet and from that point you can land on the planet witch would be a new room

but if you type something there is nothing at like
/nav 123,156
or
/nav 157,356 or anything that the script has no planet or ship at making the disply say theres nothing here....

It sounds to me like you're onto something.
After reading your initial statement, I was going to suggest on simple terms, making the coordinates a room and you would have to make the actual command a special entry from the player. But it would get kind of hairy if you had an unlimited amount of possible coordinates and only a select few takes you somewhere... as in your example above where /nav 123, 123 replies with text that nothing is there. It also seems you were thinking the same type of thing so I'm not really enlightening you. sorry!! :!:
It's beyond my meager thoughts after that. Any experienced coders on here are sure to give good ideas.

steve the gaming guy :idea:

ac19189
15 Nov 2004, 18:55
lol yes I was thinking that but I also though it be easyer to make only the rooms i need based on the cords i want so when you type /nav 1,2 it takes you to a room i want because the where set as a room but if you type /nav 1,3 witch would be nothing the script kicks in and says hey there in no room for that so the error msg im going to disply is Theres nothing here and kick me to the default room called empty space or something..... :roll:

I think Im Dead
15 Nov 2004, 23:48
What you are talking about is a coordinate based engine for a text game. These do exist, but are very complex engines. It has long been a dream of mine to do a coordinate based game through Quest, and just recently I have made significant progress on a multiplayer coordinate based engine. It's just now in the early stages(just added collision detection, woo!) but I could possibly host a demonstration via Questnet for a couple days. Let me work on it a bit more, see what I can get accomplished tonight.

ac19189
16 Nov 2004, 04:23
Ok :D I was thinking the most simple way to make the code is to tell the program when you type /nav 1,2 if the code marks something as there it will take you to the room for that number but if you type /nav 1,7 and theres nothing there it will take you to a error room witch will be empty space and then disply theres nothing there.... lol I cant wait to see how its made :wink:

I think Im Dead
16 Nov 2004, 06:46
I see that you get the concept of things being a grid basically, now try and wrap your head around it in this sense.

Why do we need a room 1,2 or a room 1,7? Typically what coordinate based engines do is give a room, for this example called HOME, an X and Y property(Z if necessary or desired), and assign a value for what size each piece of the "grid" is.

So you basically can create only 1 room, with assumed values X=30 and a Y=30 and an assumed value that each 1 of those is say 5 feet by 5 feet, then have the appearance displayed to the users dynamically created whenever they type LOOK based on what coordinates they inhabit in the room.

My main interest in an engine like this is things like a true engagement/ranged combat system, line-of-sight vision, and other dynamic combat ideas using cover and such. An engine like this would allow you to move behind a tree for instance and while hugging against it's northern face, conceal yourself from players looking from a more southern coordinate. Or perhaps an archer could crouch behind a tree stump, stand and fire two arrows then crouch before an enemies arrows slam into the stump.

paul_one
16 Nov 2004, 08:17
Doesn't the quest object thingy get in the way of this?
It'll show all the objects in the room - no?

At first I thought ac19189 was ITID (because of the grid-based idea) but now I don't.

Right, there are a couple of ways you can do this - ITID has one (and a very nice one at that) in his head - while I have another.

If you're a programmer by heart, you think of a grid - you then think of a two/three dimensional array. If you do this, you set up your array (in Quest you can't have 2 dimensional... so you need one BIG array of 9999 for 99x99), and then use that to store names of objects etc. That I think is nice - but does get a little annoying every now and then, checking the array.
Then there's ITID's idea about object properties. Using them to give a position on a grid. I love this idea, so simple, and you can apply it to all the objects really easily.
Now, the thing that get's me is, if you have a big grid (9999x9999) and have ALOT of objects around the place (let's say 0.1 percent inhabited) 99999 objects, that'll take ALOT of time to go through all the objects to do some rules. On the other hand, the grid size is over the amount quest can use as an array (99999999). So ITID's way technically 'wins', but is slower than an array-based engine if it was possible (as in an array, you only have to check a few values).

ac19189
17 Nov 2004, 06:57
:? :? :?
Ehhh....
Yah errm right... got it....
lol

Im kinda see what you are saying just dont understand why it cant be done just telling the script when you type 1,2 because 1,2 is set to take you or open the path way to room test1 but when you type 1,3 because theres no room programed for that it auto takes you to test2 room pretty much making the script take you to a room no matter what but based on what you type it sends you to a dif room it be easy just to make it 1,3 test2 1,4 test2 script etc and just keep going but then theres a limit and it takes lots of time but if you make the script take you to only the rooms that are programed for a singel command like 1,2 is set to test1 room but if thats the only room thats been set on the code and you type in something other then 1,2 it takes to test2 room because it wasnt the right thing it could also be used as a prassword system anything typed other then the right code will make you get sent to the wrong room.....

You are both usen word that are to big for my little mind :P or it might be i need sleep not sure :wink: :lol:

paul_one
17 Nov 2004, 12:43
No-no, it's OK.

You're thinking of a room-based grid system (loads of rooms, in a grid).
That would means you'd have to create each room, and changing a location would move stuff/people around different rooms.

What ITID and I are talking about is using ONE room, but hiding the objects/players in the one room, so that it has a "distance"... Think of the world as one room - and everything around you is on a grid. Now think of the grid - instead of rooms, is just numbers and points. Those number and points can be stored in different ways.

By your question: yes it's really simple to have three rooms, and when someone types '%number1% , %number2%' it either takes you from 1 to 2, or from 1 to 3. You have a conditional statement, and test the value's of number1 and number2.

ac19189
17 Nov 2004, 21:35
Ok now I understand what your saying :P thanks for the break down into dummy terms lol :lol:

Now a simple question for a complex script is it possable?

Hemo
24 Nov 2004, 08:45
ac19189 wrote::? :? :?
Ehhh....
Yah errm right... got it....
lol

Im kinda see what you are saying just dont understand why it cant be done just telling the script when you type 1,2 because 1,2 is set to take you or open the path way to room test1 but when you type 1,3 because theres no room programed for that it auto takes you to test2 room pretty much making the script take you to a room no matter what but based on what you type it sends you to a dif room it be easy just to make it 1,3 test2 1,4 test2 script etc and just keep going but then theres a limit and it takes lots of time but if you make the script take you to only the rooms that are programed for a singel command like 1,2 is set to test1 room but if thats the only room thats been set on the code and you type in something other then 1,2 it takes to test2 room because it wasnt the right thing it could also be used as a prassword system anything typed other then the right code will make you get sent to the wrong room.....

You are both usen word that are to big for my little mind :P or it might be i need sleep not sure :wink: :lol:


Punctuation might help, too. Just a thought. :wink:

ac19189
24 Nov 2004, 17:35
Ok im about to look dumb but hey its all part of the game....

Whats Punctuation? lol

Hemo
01 Dec 2004, 16:34
Oh(,) my god(!) Are you being serious(?) Like(,) everyone knows what punctuation is(.) It's like(...) basic stuff you learned in elementary school(.) Like spelling(,) and stuff like that(!) :wink:

Shadowalker
01 Dec 2004, 22:30
I have an Idea for this problem of yours. Okay people, correct me if I say something wrong or stupid, because I am a beginner at QDK, and I don't even know how to program; I use the interface. But I had an idea of what I would do if I had this problem, or if I was making this game. Okay. What I would do is go to "custom player commands" and say "If player types in (exe) 1,3, bring them to room1." Now, if you are not making a lot of rooms, that won't be hard. (Even if you need to make 10 or 20 rooms that way.) If I understand you correctly, your problem is if someone would type in a nonexistent room, say, 1,99, and it would display "No such thing" or something like that. My first idea would be to make an array (I hope I'm correct; someone tell me if I'm not, because I have never actually written an array and I'm not sure how, but I get the idea of how it works) so that , lets say you make 10 rooms. Program 1,1, to take you to room1, 1,2, to take you to room2, until room10. Then, make an array that if "anynumber,anynumber" (by that I mean anything by anything, like 5,9,) is typed in, display a certain message, such as "That planet is inaccessible with your means of travel." That is my worst idea. They get better lol. My second (and better) idea is that you should have a custom command, such as "travel." Then, make a menu. Now, instead of just typing, " 1,2" a player types in "travel" first, to let you know he wants to travel. Then you make the menu. The menu should be a popup menu that says: "Please choose a destination" and it will list all the player's possible choices. That way, a player can choose one and you don't need to worry about the player typing in a non-existent room and receiving a wrong (or unwanted) message. Now, here is my last idea. It will be the same custom command. "Travel." Except this time, instead of having a menu pop up, go to "enter next command into string variable." Then do all your rooms as "if's". For example: "Enter players next command into "travel" string." Then make all the following: "If #travel# is equal to 1,1, then move player to room1" Then add. "If #travel# is equal to 1,2, then move player to room2" and so on and so on until you "If" your 10 rooms. THEN you do: "If #travel# is equal to_______" in that space, if you want, you can type in numbers 1 through 99. That would take a while, but not too long, I think. The way you do it is by adding a ; between words. That way, the game recognizes it as multiple optional commands. For example, you would type in "If #travel# is equal to 2,1;2,2;2,3;2,4;2,5;2,6;2,7.…"and so on then display the" You can't get there…." Message. Anyway, those are my ideas, and I hope you can actually understand what I mean. Good luck…

007bond
02 Dec 2004, 02:06
Hey, ebayfan: have you ever heard of punctuation? perhaps paragraphs? capatilisation? or are you only 2 years old and haven't been to school yet? I simply don't read properly written texts on the web at all. If you want help, take the time to write properly.

ac19189
02 Dec 2004, 15:14
Hemo wrote:Oh(,) my god(!) Are you being serious(?) Like(,) everyone knows what punctuation is(.) It's like(...) basic stuff you learned in elementary school(.) Like spelling(,) and stuff like that(!) :wink:


I know what it is. I was being sarcarstic...... :roll:

paul_one
02 Dec 2004, 15:18

I simply don't read properly written texts on the web at all

We know...

Shadowalker
03 Dec 2004, 01:54
007Bond, I have no clue what you are talking about. I USED punctuation. (If you open your eyes and LOOK) The only think I didn't do is paragraphs, and that is because this is a FORUM, not a SCHOOL. So if you are looking for perfect puncuation, go back to school.

007bond
03 Dec 2004, 05:59
I did look. If you want to make something more readable, use paragraphs. Writing in one big chunk like that makes it hard to read because you can keep losing your spot among other things. And just to let you know, i am at school. I'm 13, and I write better then you.

Anonymous
03 Dec 2004, 18:25
ah, but you are getting comma happy AND you started a sentence with an "and"

davidw
03 Dec 2004, 19:18
007bond wrote:Hey, ebayfan: have you ever heard of punctuation? perhaps paragraphs? capatilisation? or are you only 2 years old and haven't been to school yet?


Oh, I saw this and just had to take the piss out of it. :P A post criticising the quality of another post and it's riddled with errors!

For a start: what about capitals yourself, pal? They teach that in the school you go to, Codingmaste- er, sorry. 007Bond. :) And what, pray tell, is "capatilisation" - is it a kind of capitalisation for people not intelligent enough to check their own spelling while they're criticising someone else?


007bond wrote: I simply don't read properly written texts on the web at all. If you want help, take the time to write properly.


Yep, you'd really be wanting the help of someone like 007Bond. If you want hints on how to change your username in such a way that everyone knows you did it, he's the guy to ask.

007bond
03 Dec 2004, 22:30
1. I'm not codingmasters
2. Big deal. I bet you can't tell me that you've never written like that before. I do it all the time on the web when i'm writing short messages. But if i write a long post, i make sure that it's easy to read and understandable, with no SMS talk

Hemo
07 Dec 2004, 02:52
Hey, ac19189, I'm sure you know what punctuation is. I was doing a little tongue in cheek sarcasm myself, as indicated by the winking emoticon at the end of the message. Handy thing, that. Anyway, don't have a cow about it. I was just pulling your leg. I, on the other hand, have a problem with dangling participles, but I don't want to get too personal. :lol:

As for 007bond... I'm just sorry that I wasn't as fast as davidw was in zinging your post. Got you admit, he got you good. :o

Laugh, people! It's good for you! :D

EagleWing
11 Dec 2004, 18:18
:oops: 007Bond scribbled

Hey, ebayfan: have you ever heard of punctuation? perhaps paragraphs? capatilisation? or are you only 2 years old and haven't been to school yet? I simply don't read properly written texts on the web at all. If you want help, take the time to write properly.


I really can't believe what I'm reading! I only come here about once a week so I didn't see it earlier, but to think that an illiterate 13 year old has the audacity to criticise the writing of others is outrageous. It's not the first time, either. I don't have too much problem with his being illiterate but, it is written, "People who live in glass houses shouldn't throw stones."

Frank

lyteside
11 Jan 2006, 20:48
my solution at incorporating coordinates was to have a computer screen ask for the X, Y, and Z coordinates individually. I don't know if this will work for you at all, but this way I could have a separate [ enter <xx> ], [ enter <yy> ], [ enter <zz> ] to use in all my procedures, rather than using an annoying $left tag or something (because sometimes the player may try to type 17843048 for x and suddenly, you can't get the variable you need from one input.

Are you trying to create a world built from coordinates, or are you sticking with just a see-if-the-variables-match-the-planets? I may have some code that will help you out. let me know if you want any of it.

Here's a screen shot at what it does.



Here's some example code incorporating the benefits of having individual x, y, and z coordinates rather than just searching for a single enter string:

command <engage> {
if not flag <spaceship_power> then msg <The power is off and the ship is not operational.>
else {
if not flag <space> then msg <You cannot engage a destination while you are docked. You must be out in space first.>
else {
if (%mcordinates% = 0) and (#destination# = nothing) and (#destinationQ# = nothing) then msg <The computer screen reminds you that you haven't entered any coordinates or destination yet.>
else do <gotodestinationproc>
}
}
}

' --------------------------------------

define procedure <gotodestinationproc>
foreground <&HAF8E00>
set string <Computer_Text; activate_>
do <Computer_Text_Proc>
msg <|bDESTINATION SEQUENCE|xb|xn>
pause <200>
msg <_>
foreground <white>
msg <Your spacecraft takes off into space towards your destination.>
flag on <destination_engaged>
set string <currentplanet; noplanet>
flag off <orbit>
timeron <spacetraveltimer>
end define

' ----------------------------------------

define procedure <destinationQproc>
if (%xx% <= 32) then {
if (%yy% <= 32) then {
if (%zz% <=32) then set string <destinationQ; ALPHA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; KAPPA>
if (%zz% > 65) then set string <destinationQ; TAU>
}
if (%yy% > 32) and (%yy% <= 65) then {
if (%zz% <=32) then set string <destinationQ; DELTA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; NU>
if (%zz% > 65) then set string <destinationQ; CHI>
}
if (%yy% > 65) then {
if (%zz% <=32) then set string <destinationQ; ETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; PI>
if (%zz% > 65) then set string <destinationQ; ATLAS>
}
}
if (%xx% > 32) and (%xx% <= 65) then {
if (%yy% <= 32) then {
if (%zz% <=32) then set string <destinationQ; BETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; LAMBDA>
if (%zz% > 65) then set string <destinationQ; UPSILON>
}
if (%yy% > 32) and (%yy% <= 65) then {
if (%zz% <=32) then set string <destinationQ; EPSILON>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; XI>
if (%zz% > 65) then set string <destinationQ; PSI>
}
if (%yy% > 65) then {
if (%zz% <=32) then set string <destinationQ; THETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; RHO>
if (%zz% > 65) then set string <destinationQ; MUSE>
}
}
if (%xx% > 65) then {
if (%yy% <= 32) then {
if (%zz% <=32) then set string <destinationQ; GAMMA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; MU>
if (%zz% > 65) then set string <destinationQ; PHI>
}
if (%yy% > 32) and (%yy% <= 65) then {
if (%zz% <=32) then set string <destinationQ; ZETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; OMICRON>
if (%zz% > 65) then set string <destinationQ; OMEGA>
}
if (%yy% > 65) then {
if (%zz% <=32) then set string <destinationQ; IOTA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; SIGMA>
if (%zz% > 65) then set string <destinationQ; XIATA>
}
}
end define

' -------------------------------

define procedure <checkcoordinatesproc>
msg <Based on your current data, you will be entering the #destinationQ# quadrant.>
set string <destinationP; noplanet>
if (%xx% = %Ex%) and (%yy% = %Ey%) and (%zz% = %Ez%) then {
set string <destinationP; Earth>
msg <The coordinates correspond with Earth's exact location, so |xn>
}
if (%xx% = %Mx%) and (%yy% = %My%) and (%zz% = %Mz%) then {
set string <destinationP; Mars>
msg <The coordinates correspond with Mars' exact location, so |xn>
}
msg <I have set your destination accordingly.>
end define

' -----------------------------

define timer <spacetraveltimer>
interval <1>
action {

if (%xx% > %currentx%) then inc <currentx>
if (%xx% < %currentx%) then dec <currentx>
if (%yy% > %currenty%) then inc <currenty>
if (%yy% < %currenty%) then dec <currenty>
if (%zz% > %currentz%) then inc <currentz>
if (%zz% < %currentz%) then dec <currentz>
do <currentQproc>
if not (#ncurrentQ# = #currentQ#) then msg <You are now entering the #ncurrentQ# quadrant.>
set string <currentQ; #ncurrentQ#>
if (%xx% = %currentx%) and (%yy% = %currenty%) and (%zz% = %currentz%) then do <reachdestinationproc>

}
disabled
end define



in this code, i have set up a rubix cube, so to speak, out in space as quadrants. That way, you can do one of two things...

1) if the player happens to type in the exact coordinates of a planet, the computer can say "werd, you're goin to the planet."

2) if the player types in the coordinates and merely goes to a quadrant, you can put things in each quadrant that will trigger if they are in that area, such as hostil space pirate areas, or the sun's heat area, or whatever. Sky's the limit.

Gordex
12 Jan 2006, 20:56
I am helping Lyteside with his game by making some of the modules and engines.

The code below is my engine for finding out the distance between 2 sets of x,y,z coordinates. Depending on how your game plays, you will need add the necessary variable(s) to this proc, or set them as per Lyteside's code.

The coordinates engine we are referring to is as follows:


define procedure <gettraveltime>

' [x-z]1 is where you are now.
' [x-z]2 is where you want to go.
' [x-z]3 is the final destination length per coordinate (rounded down to the nearest whole number)

set numeric <x1; %currentx%>
set numeric <y1; %currenty%>
set numeric <z1; %currentz%>
if flag <distzero> then flag off <distzero>

' get single distances

if (%x1% <> %x2%) then {
if (%x1% < %x2%) then set numeric <x3; %x2% - %x1%>
else set numeric <x3; %x1% - %x2%>
}
else set numeric <x3; 0>

if (%y1% <> %y2%) then {
if (%y1% < %y2%) then set numeric <y3; %y2% - %y1%>
else set numeric <y3; %y1% - %y2%>
}
else set numeric <y3; 0>

if (%z1% <> %z2%) then {
if (%z1% < %z2%) then set numeric <z3; %z2% - %z1%>
else set numeric <z3; %z1% - %z2%>
}
else set numeric <z3; 0>

' get total distance

if (%x3% = 0) or (%y3% = 0) or (%z3% = 0) then {

if (%x3% > 0) and (%y3% > 0) and (%z3% = 0) then {
set numeric <x3; %x3% * %x3%>
set numeric <y3; %y3% * %y3%>
set numeric <distance; %x3% + %y3%>
}
if (%x3% = 0) and (%y3% > 0) and (%z3% > 0) then {
set numeric <y3; %y3% * %y3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %y3% + %z3%>
}
if (%x3% > 0) and (%y3% = 0) and (%z3% > 0) then {
set numeric <x3; %x3% * %x3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %x3% + %z3%>
}
if (%x3% > 0) and (%y3% = 0) and (%z3% = 0) then set numeric <distance = %x3%>
if (%x3% = 0) and (%y3% > 0) and (%z3% = 0) then set numeric <distance = %y3%>
if (%x3% = 0) and (%y3% = 0) and (%z3% > 0) then set numeric <distance = %z3%>
if (%x3% = 0) and (%y3% = 0) and (%z3% = 0) then flag on <distzero>

}
else {
set numeric <x3; %x3% * %x3%>
set numeric <y3; %y3% * %y3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %x3% + %y3%>
set numeric <distance; %distance% + %z3%>
}

'---------------------------- this will get your distance

if not flag <distzero> then {

for <distancedone; 1; 500; 1> {
set numeric <distancechecker; %distancedone% * %distancedone%>
if (%distancechecker% >= %distance%) then {
dec <distancedone>
set numeric <duration; %distancedone%>
set numeric <distancedone; 501>
}


}
}
else set numeric <duration; 0>
flag off <distzero>

end define


EDIT: Noticed a minor flaw :)

EDIT2: There was a bug or 2 in the previously posted code, so I replaced (overwrote) with this!

Gordex
17 Jan 2006, 01:21
fixed the code above! :)

paul_one
17 Jan 2006, 12:02
Here's the code simplified to what's neccissary and easier to read:

define function <diff>

set numeric <pa1; $parameter(1)$>
set numeric <pa2; $parameter(2)$>

if (%pa1% < %pa2%) then set numeric <ret; %pa2% - %pa1%> else set numeric <ret; %pa1% - %pa2%>

return <%ret%>

end define

define procedure <gettraveltime>

' [x-z]1 is where you are now.
' [x-z]2 is where you want to go.
' [x-z]3 is the final destination length per coordinate (rounded down to the nearest whole number)

set numeric <x1; %currentx%>
set numeric <y1; %currenty%>
set numeric <z1; %currentz%>
if flag <distzero> then flag off <distzero>

' get single distances

set numeric <x3; $diff( %x1%; %x2% )$>
set numeric <y3; $diff( %y1%; %y2% )$>
set numeric <z3; $diff( %z1%; %z2% )$>

' get total distance

set numeric <x3; %x3% * %x3%>
set numeric <y3; %y3% * %y3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %x3% + %y3%>
set numeric <distance; %distance% + %z3%>


'---------------------------- this will get your distance

if not flag <distzero> then {

for <distancedone; 1; 500; 1> {
set numeric <distancechecker; %distancedone% * %distancedone%>
if (%distancechecker% >= %distance%) then {
dec <distancedone>
set numeric <duration; %distancedone%>
set numeric <distancedone; 501>
}


}
}
else set numeric <duration; 0>
flag off <distzero>

end define

Gordex
17 Jan 2006, 17:38
*gasp*, I didn't know a "diff" command existed! That changes things a bit!

paul_one
18 Jan 2006, 10:37
I don't think it does.
I made it.

See the "declare function"?

You pass it $parameter()$ 's, and use numbers to get at them.

This simplifies using the same 'if'.

Personally I even use functions in place of procedures half the time - allows me to pass back a success/fail signal.

I picked up that you were trying to be too thurrough with the 3D trig too.
You don't need to get into catching zero unless you're deviding. And a simple
sqroot(x^2 + y^2 + z^2) is all that is needed.

Gordex
24 Jan 2006, 23:10
I was having trouble finding a "sqroot" command, so I just did the math myself. :)