Computer Science Canada space invaders |
Author: | diablo [ Wed Nov 03, 2004 2:22 pm ] |
Post subject: | space invaders |
I am making a space invaders game and i have the code right.... except that when the enemies spawn on the screen, my ship dissapears and after it stops(i moved it 5 times), then my ship reappeared and functioned normally. can you help me with any code that will help me in keeping my ship on the screen and my enemies at the same time? i am using version 4 btw |
Author: | Tony [ Wed Nov 03, 2004 4:06 pm ] |
Post subject: | |
eh... a wild guess would be that you're spawning spaceships in a loop and you forgot to include player's ship inside of it.. ![]() |
Author: | diablo [ Thu Nov 04, 2004 8:15 am ] |
Post subject: | |
im not using a loop here is my code for the spawn of the enemies: var enemy1:int:=Pic.FileNew("picture1.jpg") delay(200) Pic.Draw (enemy1, 600,300, picXor) delay(1000) cls ....and that repeats itself 5 times and then my ship appears. Quote: how do we know we exist?
maybe we dont exist... |
Author: | Tony [ Thu Nov 04, 2004 8:31 am ] |
Post subject: | |
diablo wrote: delay(200) delay(1000) oh, I donno... You think those two might have _anything_ to do with the fact that your spaceship disappears? |
Author: | diablo [ Thu Nov 04, 2004 11:31 am ] |
Post subject: | |
good advice......... but when i got rid of them nothing happened at all could it be that they arent in a loop together? |
Author: | diablo [ Thu Nov 04, 2004 11:34 am ] |
Post subject: | |
the delay(#) only delays the tme that the sprite comes back on the scrreen so they dont all move at the speed of light or only appear once. |