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 Discussion / any one no the answer tell me NOW (distances)

Author
Message
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 19th Mar 2005 05:59


wherer do i enter the distance in this code
Mr Pointless
20
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 19th Mar 2005 06:05
If I knew what it was for, I might be able to figure it out, but since you put just that line, it doesn't make sense. To me at least.

Iwata: "YOU'RE NOT HIM! YOU'RE NOT SUMIYOSHI! EEEEYAAAAAA!"
Sumiyoshi: "Who am I then?
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 19th Mar 2005 06:47
To quote Joe Coonig:
Quote: "s Nosnevel Xela didn't finish. sqrt((x1-x2)^2+(z1-z2)^2)=distance where x1,z1 is locationof starting object and x2,z2 is the coordinates of ending object. To find it in 3d, make it sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)=distance where y1 and y2 are the y positions for the start and end."


Crazy Donut Productions
Current Project: A Redneck game
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 19th Mar 2005 16:51
[/code]wheres do you enter the distance on this code for it to go on to the "then"
[code]
IF (objx1#-objx2#)^2 + (objy1#-objy2#)^2 + (objz1#-objz2#)^2 < 100(for distace)^2 then end

@ Bear Crazy Donut Productions to confusing
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 19th Mar 2005 19:33 Edited at: 19th Mar 2005 19:37


Just change the ObjectID variable to reflect the 2 objects numbers and the answer is in Distance#

*EDIT* Remember, there is two sets of commands to get object positions, the first 3 are object 1, the second 3 are object 2. Infact, have this.



Just call GetDistance#(Object Number 1, Object Number 2) and it gives you the distance.

1800+ XP - GeforceFX 5600 - 256MbDDR - 60Gb Hdd - XP Pro (SP2)
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 19th Mar 2005 21:17
!Hi! although Mobiius has answered you question i would just request that as a matter of etiquette on these forums that you dont make such demanding threads, a please and a thankyou can go along way.
Fud
20
Years of Service
User Offline
Joined: 16th Nov 2004
Location:
Posted: 19th Mar 2005 21:43
know

Teh Sig Goes Here.

Login to post a reply

Server time is: 2025-05-31 05:48:53
Your offset time is: 2025-05-31 05:48:53