|
-
Jan 24th, 2000, 02:17 AM
#1
Thread Starter
Hyperactive Member
Hi,
As the subject says, this is not an easy to explain question. I'll tell you a little bit about the program first:
I'm making a game where you are an army tank. When you press start, the map starts moving, giving you the effect that the tank is moving as well. By using the arrow keys, you can move the tank further up or down, or to the left or right. Using the space button, you can shoot a bullet. Because the user's tank and the enemy tank are not embedded into the map, I used labels that ARE embedded to make collision detection easier. So, what I did was put a label directly above the user's tank, and two label below the enemy tank.
Question:
I used the labels to detect collision. Likewise, I used them to determine whether or not a bullet has hit the enemy. When I run the game, if I stay still and shoot and the bullet hits the enemy, the collision is detected. Also, if I first move left or right, and then shoot, the collision is detected. In addition, if you move up or down and then shoot, the collision is detected.
However, if you move up/down and left/right before you shoot, the collision is not detected.
Sorry if this sounds a little bit confusing. I hope you understood. 
If you need to see my code, please let me know.
Thanks.
------------------
Regards,
Alexander McAndrew
VB Zone
http://vbzone.cjb.net
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|