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 / a few questions

Author
Message
Falc
20
Years of Service
User Offline
Joined: 9th May 2004
Location:
Posted: 24th Aug 2004 06:43
i\'m new to this all (working with demo)

is there a function to get the distance between 2 objects or 2 points ?

when I program a function to say multiply 2 numbers, and I call the function like this
\"$result = multi(2,4)\"

$result should now be 8, how do I let the function return that value tot that variable(could be any variable), or is that not possible ?

are there good tutorials that explain the basics of vectors cause I don\'t understand any of it and the help files aren\'t much help either
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 24th Aug 2004 07:20
well you can do the math inline but....

Function Multiply(a as integer, b as integer)
local c as integer
c = a * b
Endfunction c

just as an example.

then you could say MyInt=Multiply(2,4)


DBP_NETLIB_v1.4.3 - 65 FREE Functions * Click Logo
Falc
20
Years of Service
User Offline
Joined: 9th May 2004
Location:
Posted: 24th Aug 2004 07:42
jep just find that out, now remains the ohter 2 questions
eat much pie
20
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 24th Aug 2004 07:54
For objects:



And you can work out the function for 2 points

Hope that helps!


[href]Checkpoint Router[/href]: My AI Routing Program
Sam Wright
Falc
20
Years of Service
User Offline
Joined: 9th May 2004
Location:
Posted: 24th Aug 2004 08:21
yeah i already worked out something like that

Login to post a reply

Server time is: 2024-09-22 22:33:41
Your offset time is: 2024-09-22 22:33:41