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 / MY ALIENS WON'T MOVE

Author
Message
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 2nd Nov 2003 16:45
Hi all, I'm trying to make a space invaders type clone but can't get my invaders to move left and right.
This is my code for my invader sprite.

this draws the invaders in the right place but I can't get them to move. Please help.Thanks.

why do I always get so confused?
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 2nd Nov 2003 17:40 Edited at: 2nd Nov 2003 18:14
if you need more info just say.Thanks

"I SEE" said the blind man
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 2nd Nov 2003 18:13
you'll need to use AI to get them to move.

http://www.freewebs.com/ingamers
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 2nd Nov 2003 18:16 Edited at: 2nd Nov 2003 18:17
what if I just want them to move in a set direction. i.e. left,right,left,right etc.

"I SEE" said the blind man
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 2nd Nov 2003 19:45
i dunno

http://www.freewebs.com/ingamers
KNau
22
Years of Service
User Offline
Joined: 25th Nov 2002
Location: Canada
Posted: 2nd Nov 2003 20:40
You will need to store each alien's X position as a variable. For example:



That would move your aliens horizontally all the way off the screen. You would have to create your own IF/THEN statement to reverse the alien direction once they reach the edge of the screen.

http://www.canceriannewmedia.com
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 2nd Nov 2003 22:51
thanks for your help,I'm going to try this out now and I'll let you now how I get on.

"I SEE" said the blind man
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 3rd Nov 2003 18:43
Thanks for all your help, my dad finally solved my problem and now I'm using arrays to make the invaders move.

"I SEE" said the blind man

Login to post a reply

Server time is: 2024-11-25 16:35:49
Your offset time is: 2024-11-25 16:35:49