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.

2D All the way! / Simple Shootem game, prob with sprite update

Author
Message
Serain
18
Years of Service
User Offline
Joined: 17th Jul 2006
Location:
Posted: 17th Jul 2006 18:54
Hi,

I'm on my second day of DarkBasic and I'm trying to make a simple Shoot'em Up game based on Reaperman's tutorial. I managed to add some enemies but I'm having a problem making them move. For some reason only one of the enemy sprites (20 total) will move. I'm trying to make them all scroll down the way (the game is space invader style, enemies come from the top of the screen and should move down the way). Here is my code so far:



Thanks for reading!
Serain
18
Years of Service
User Offline
Joined: 17th Jul 2006
Location:
Posted: 17th Jul 2006 20:42
Sorry I didn't realise the code was that long and I guess most people won't go through the whole thing. If you want to take a look and see if you can help me the UpdateEnemies sub is the just the last 8 lines.
Thanks!
m2zt
19
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 17th Jul 2006 21:22
Just change this line in the updateenemies sub sprite 149 + 1,enemyx(i),enemyY(i),2 to sprite 149 + i,enemyx(i),enemyY(i),2

You cant have a 1 there because it will always be 150.

Futurama 2008
Serain
18
Years of Service
User Offline
Joined: 17th Jul 2006
Location:
Posted: 17th Jul 2006 21:36
Oh my god
I can't believe I didn't see that. I guess I was really tired.
Sorry for wasting your time on such a stupid thing.

Login to post a reply

Server time is: 2025-05-15 17:53:01
Your offset time is: 2025-05-15 17:53:01