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 / really mind bending function problem

Author
Message
Saiphox
21
Years of Service
User Offline
Joined: 16th Nov 2003
Location:
Posted: 19th Nov 2003 04:30
Whenever I run my program, it does fine until it gets to 'Function Chase_Camera(id)' Right when it gets to this function the program closes with no errors. It just closes. I searched the forums, but could not find anything to rectify my problem. If there is any DB genius that can help me. Please do.

I am using DBPRO if that matters at all.

Thanks,
James

-Coke and Puerto Rican rum will get you drunk if you didn't know.-
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Nov 2003 04:40 Edited at: 19th Nov 2003 04:43
When your program gets to "hide object 2", that is the end of your program. The function has to be called, the function key word defines your function but does not execute it.

See attached code for a quick fix. [I ran this through the compiler, but I could not test it. I also fixed some IF logic that looked busted.]
--
TAZ
Saiphox
21
Years of Service
User Offline
Joined: 16th Nov 2003
Location:
Posted: 19th Nov 2003 05:15
Thanks for your help.

I added the code to call the function in the loop and the program doesn't quit before it starts.

Now I am trying to figure out a way for the camera to rotate with the object, so that it always stays behind it. The way it is now, the camera never rotates. It is always looking forward (Z).

???

Any help?

-Coke and Puerto Rican rum will get you drunk if you didn't know.-
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Nov 2003 15:26
The command is...

point camera cameraID, x, y, z

try...

point camera 0, object position x(1), object position y(1), object position z(1)

0 is the default camera and 1 is the object number of your ship.
--
TAZ

Login to post a reply

Server time is: 2024-11-25 17:47:22
Your offset time is: 2024-11-25 17:47:22