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 / help still needed

Author
Message
No budget games
20
Years of Service
User Offline
Joined: 26th Feb 2004
Location:
Posted: 15th Apr 2004 19:21
can someone correct this object playing and movement code
if upkey()=1 then play object 1,26,26 pitch object up,1,180: move object 1,-0.2
if downkey()=1 then play object 1,26,26+50 pitch object down,1,180: move object 1,-0.2
if leftkey()=1 then play object 1,26,26+50 turn object left,1,180: move object 1,-0.2if upkey()=1 then play object 1,26,26 pitch object up,1,180: move object 1,-0.2
if downkey()=1 then play object 1,26,26+50 pitch object down,1,180: move object 1,-0.2
if leftkey()=1 then play object 1,26,26+50 turn object left,1,180: move object 1,-0.2

sj
Lord Helmet
21
Years of Service
User Offline
Joined: 30th May 2003
Location:
Posted: 16th Apr 2004 01:50
1. on the 4th line you have something weird going on. read along it.

2. just say "if upkey() then " upkey() returns a 1 or 0, if responds to a 1 or 0 (true or false) 1=1 is like saying if Upkey() is the same as true when you could say if upkey() is true. That won't affect your programs functioning though. Just makes more sense and makes less work for the computer, resulting in an inftesemil speed boost.

Login to post a reply

Server time is: 2024-11-26 12:38:57
Your offset time is: 2024-11-26 12:38:57