|
-
Oct 20th, 2001, 07:35 PM
#1
Vb Newbie Needs Some Help Please!
Hi,
I'm new to games in Visual Basic and am trying to make a game with colission detection and barriers (so your characters can't go off the screen) and code that will make an object just automatically move across the screen (like a laser or bullet). Anyways, could someone help me out? That'd be so great!
Thanks a lot.
-Greg
-
Oct 23rd, 2001, 08:05 AM
#2
Member
Have you tried anything? If you have, just tell us where you're stuck.
-
Oct 23rd, 2001, 02:43 PM
#3
Addicted Member
i've made it ( in a small prog) only like this:
Code:
If pic1.Left < Then pic1.Left = 0
Else
End If
something like that!! you know!! i stop the pic if it is over my line i.e. over Left=1000 then no stepp
cya Longbow
Old enough to know better,
but young enough to don't give a ****!
-
Oct 24th, 2001, 12:29 PM
#4
Addicted Member
type playertype
x as integer
y as integer
end type
dim player as playertype
if player.x < 0 then player.x = 0 'where 0 is the left edge
if player.x > 1000 then player.x =1000 'where 1000 is right edge
if player.y < 0 then player.y = 0 'where 0 is the top edge
if player.y > 1000 then player.y =1000 'where 1000 is down edge
how you get this messy code
-
Oct 24th, 2001, 12:31 PM
#5
Addicted Member
for collision you need to check if the player is between the left edge (player.x) and right edge (player.x + player.width)
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
|