Computer Science Canada my enemy plane wouldnt shoot laser, help |
Author: | yingmu [ Sat Jun 11, 2005 10:09 am ] | ||
Post subject: | my enemy plane wouldnt shoot laser, help | ||
heres my code, my enemy planeflys fine, but it wont "drop" a laser, plz help
|
Author: | Cervantes [ Sat Jun 11, 2005 10:53 am ] |
Post subject: | |
Hi. Please, indent and comment your code before you post it. It makes helping you a lot easier. The thing is, your "laser" is drawn. The problem is that it goes offscreen really, really soon after. Try adding a delay, and you'll see it breifly. Try making it so the "laser" goes down the screen, not up, and you'll see it. It would be helpful for you to learn arrays, records, and then flexible arrays. That way, you can create laser/bullet objects. That would make creating multiple bullets/lasers easy, so the plane can shoot more than one thing at a time. You could even give it a machine gun type weapon. Check out the Turing Walkthrough. |