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.

DarkBASIC Discussion / My Spaceship Won't Move

Author
Message
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 23:16
Hey all, I know i've been posting alot lately but we all have to start somewhere. I'm trying to make a space invaders type clone but no matter what I try my ship just won't move. Heres what I've got so far.


after this I think its something to do with if leftkey()=1 then x+5
but I don't know how to use this to move my ship left and right.
Please help.Thanks.

why do I always get so confused?
Preston C
22
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 25th Oct 2003 23:20 Edited at: 25th Oct 2003 23:20
how bout

if leftkey()=1 then x=x+5

with your way, x would never increase


soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 25th Oct 2003 23:25
Thanks, how would the computer know I meant move my spaceships x posiston though and not my aliens(when I put them in.)Thanks again

why do I always get so confused?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 26th Oct 2003 01:30
No offence, but shouldn't these questions be in the newb section?


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Oct 2003 01:37
Have you put petrol in your spaceship?

Seriously...read the help on Sprites and look at the usage examples for sprites, it's quite straight forward if you read it.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 26th Oct 2003 17:27 Edited at: 26th Oct 2003 17:27
Thanks to all who helped me I've sorted it now.

why do I always get so confused?

Login to post a reply

Server time is: 2025-05-21 10:27:06
Your offset time is: 2025-05-21 10:27:06