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 / Another error in DBpro while using Sparky.DLL

Author
Message
FPSC Scripts
17
Years of Service
User Offline
Joined: 2nd Oct 2006
Location: Curacao
Posted: 3rd Jul 2007 06:54
Hi all,i got into a problem again while trying to set up collision for my object while using the Sparky.DLL,i look in the commands that the sparky.dll came with and i ended up a code:

But when i try to use it i get a error saying:"unknown command"
And when i looked in the commands i saw the code like this

So whats a return float(i looked like everywhere and could not find that info)?,and if you know a easy way to create smooth collision using the sparky dll,pleas explain it to me step by step in this topic on how to do it.

i'm the M king.
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 3rd Jul 2007 18:53
'return float' is the type of variable it returns, in this case, a float. In DBP the way to differentiate a float from an integer is with the use of the # symbol. So 'X' is an int and 'X#' is a float.
So what the code should look like is this:



Where obj1 and obj2 are the 2 entities which you are checking for collision with.

Visit the Wip!
Crit
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 3rd Jul 2007 19:31
And just to make things crystal clear, you need to use the parens when you call the function.

You wrote:


should be:

Login to post a reply

Server time is: 2024-09-27 01:22:55
Your offset time is: 2024-09-27 01:22:55