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 bit of help regarding the camera

Author
Message
HUNK UBCS
17
Years of Service
User Offline
Joined: 15th Nov 2006
Location:
Posted: 16th Nov 2006 05:11
Hello, I am doing my best to write my first actual game that is not from a tutorial with DB, and I am liking the continual flow of bugs waiting to be overcome, but I cannot figure out why the camera freaks out upon the creation of one of my "bullets" so I decided to seek some help. I also have not been able to figure out how to leave comments, I thought it was ; but it didn't work, so I understand if you don't want to take the time to figure out what is happening here.

make object box 1,10,20,10
position object 1,0,0,0
color object 1,RGB(200,0,0)
position camera 180,-70,0
point camera 0,80,0
hide mo

do
position object 1,0,0,z#
if leftkey()=1 then z#=(z#-2.5)
if rightkey()=1 then z#=(z#+2.5)
if z#>110 then z#=110
if z#<-110 then z#=-110
if upkey()=1
if bullets = 0
make object cube 100,1
bullets = (bullets + 1)
position object 100,0,12,z#
bullet0 = 1
endif
if bullets = 1
make object cube 101,1
bullets = (bullets + 1)
position object 101,0,12,z#
bullet1 = 1
endif
if bullets = 2
if limit=0
make object cube 102,1
limit = 1
position object 102,0,12,z#
bullet2 = 1
endif
endif
endif
if bullet0 = 1
move object 100,5
if object position y(100) > 140
delete object 100
bullet0 = 0
bullets = (bullets + 1)
endif
endif
if bullet1 = 1
move object 101,5
if object position y(101) > 140
delete object 101
bullet1 = 0
bullets = (bullets + 1)
endif
endif
if bullet2 = 1
move object 102,5
if object position y(102) > 140
delete object 102
bullet2 = 0
bullets = (bullets + 1)
endif
endif
loop

"I wonder who said this..."
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Nov 2006 05:14 Edited at: 16th Nov 2006 05:16
the cameras internal automatic looking will look at the next 3d object created.

autocam off and autocam on will solve that.

DBP
page 66 of the printed manual in the boxed set.

DBC
page 133 of the printed manual in the boxed set.

to remark you have two options

rem and '

HUNK UBCS
17
Years of Service
User Offline
Joined: 15th Nov 2006
Location:
Posted: 16th Nov 2006 05:25
Thank you for the very fast response!

"I wonder who said this..."
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Nov 2006 06:16
no wukkas m8

Login to post a reply

Server time is: 2024-11-14 01:28:15
Your offset time is: 2024-11-14 01:28:15