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 / Quick question

Author
Message
castek
17
Years of Service
User Offline
Joined: 15th Aug 2007
Location: Right behind you!
Posted: 19th Nov 2008 04:22 Edited at: 19th Nov 2008 04:23
Hey guys! i have a quick question, I'm making a car game so i found some code on the forums (I don't remember where) The code includes basic control (Forward left right) but it didn't include backwards so i tried to add it but it doesn't work, well going backwards does but now icant go forward here is the scrip before i edited it



And then after


its not the entire code just ask if you do want it all.


Please help! thanks!

"The Beginning is the end."
Windows Vista Ultimate SP1
INTEL PENTIUM DUAL E2200 2.2 GHz 2 Gb RAM GeForce 9600 512 mb
BlobVanDam
16
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 19th Nov 2008 08:50
The problem is that your down code is cancelling out your forward code. Since the down code is after the up code, the down code will work, but the up code will always get cancelled by the down code. Perhaps try using an if/then/else instead of two separate if statements
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 19th Nov 2008 11:37
@castek,

I am trying to learn movement controls with sprites/images. Please could you post the full code for me to take a look at?

Thanks.

Tom

castek
17
Years of Service
User Offline
Joined: 15th Aug 2007
Location: Right behind you!
Posted: 19th Nov 2008 17:19 Edited at: 19th Nov 2008 17:19
ok i got it to work thanks for your help BlobVanDam

@tom0001 here is the entire code. it wont work though because you dont have the right media files it has physics collision acceleration it's pretty cool (I didn't make it all though)




"The Beginning is the end."
Windows Vista Ultimate SP1
INTEL PENTIUM DUAL E2200 2.2 GHz 2 Gb RAM GeForce 9600 512 mb

Login to post a reply

Server time is: 2024-11-24 16:21:07
Your offset time is: 2024-11-24 16:21:07