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 / 2d shoot em up problems

Author
Message
Skynet Games
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: At home, building stuff.
Posted: 8th Jun 2009 08:12


Im having a hard time trying to do a few things. One of them is trying to get my ship to shoot so i can see the visable beam. And also so i can make the enemy move around as well and have him try to dodge my shots instead of being a complete retard. Ive been trying to figure this out for awhile now, and i need some help. Can any of you guys help me?

War sickens man, and man is forced to fight. Only a true warrior enjoys the spoils of battle. Give forth your arm and you shall receive a sword. Now fight, for what you believe in.
Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 9th Jun 2009 20:33
These are more just ideas to get you started on the problem rather than actual solutions, but...

To make the ship dodge, try this:



What this will do, when the projectile gets too close to the ship, the other ship will move according to the values you input.

Also, I've never done this, but you have a whole bunch of loops and syncs, including one at the bottom that's simply "do sync loop." I don't think you need that, or the one inside the shoot function.

You code never calls the shoot function either. Look at your first loop:



This is the only part of your code that's running. Try putting shoot() inside this loop, and read up on some function tutorials, and continue from there.

Login to post a reply

Server time is: 2024-11-24 06:21:36
Your offset time is: 2024-11-24 06:21:36