For Some Reason It Stops The Shape For Left And Right, But Not For Up And Down... So, Idk, But I Might Of Missed Somthing Because Of That Anotiation Through Whole Vidio >_<
Tip for people. If you want something to happen when you go into some like you want to run into a label or something and you want it to go to a new place. Put this code in a timer
If Image1.Top = Shape1.Top Then 'Image1 is my person Shape1 is the thing i run into
MsgBox "Worked" 'This is what will happen.
Image1.Top = Image1.Top - 90 'this will move the character back so a lag loop wont happen
sorri but this is some poor collision detection algorithm(if u could call it that), personally bruv you wouldnt implement collision like this in an RPG, tile based , or bounding rectangles (depending on your game)
can you show the whole code for
private Sub Form_KeyDown(KeyCode as Integer, Shift as Integer)
i need to move the sape thanks
rauliweb 4 months ago
mine wont work for some reason, tried twice now
well works for left and top
TehAnimatorKing 11 months ago
mine wont work for some reason, tried twice now
TehAnimatorKing 11 months ago
it didn't work for the timer being 1000, but it did for 1 meaning it needs to be constantly checking, right?
projapple12 1 year ago
For Some Reason It Stops The Shape For Left And Right, But Not For Up And Down... So, Idk, But I Might Of Missed Somthing Because Of That Anotiation Through Whole Vidio >_<
Jeffreyshnigity 1 year ago
hey u dont have to change timer just in code instead of equal write > or < and that would do! i m begginer with vb but u should realy know that!
deluksic 1 year ago
Tip for people. If you want something to happen when you go into some like you want to run into a label or something and you want it to go to a new place. Put this code in a timer
If Image1.Top = Shape1.Top Then 'Image1 is my person Shape1 is the thing i run into
MsgBox "Worked" 'This is what will happen.
Image1.Top = Image1.Top - 90 'this will move the character back so a lag loop wont happen
End If 'ends the if
lilwarthog 1 year ago
Music = :)
lilwarthog 1 year ago
Option Explicit FTW
montrealerbacon 2 years ago
can you make this for download?
rjc0l3 2 years ago
i would do that:
If Shape1.Top >= Shape2.Top then
Shape1.Top = Shape2.Top
End If
same thing with the other 3 sides.
With my solution the ball wouldnt shake around if it collides.
Just a comment for other people, you made this one almost 2 years ago, i think u got better ;D
Mihawkler 2 years ago
I can't make it work! why could it be?
maxinimrod 2 years ago
Can you please make a chat spammer, a good one PPLLEEAASSEE?????
Mattformer 2 years ago
where is shape 2
dudeofgods 2 years ago
Lol, shape two is the border, oops sorry wrong account.
VisualBasicWizard09 2 years ago
sorri but this is some poor collision detection algorithm(if u could call it that), personally bruv you wouldnt implement collision like this in an RPG, tile based , or bounding rectangles (depending on your game)
AcrazedFFfan 2 years ago
why does the 10 to 1000 interval affects?
leirbag4592 2 years ago
do you know how if my object goes over something it will enter a new form
SSHPCS2 2 years ago
in vb2008 you write
if collision (objectname,otherobjectname) then
me.hide
form2.show
sxmaxchine 2 years ago
Never mind i fixed it lol
buckfush98 3 years ago 2
im having a problem...Heres the code i copied off of you for the "wall" And im getting Runtime error "424" and it highlights the code
"If Shape1.Top = Shape2.Top Then"
buckfush98 3 years ago 2
hey good tutorial!
what's the song in the background?
Fevaklas20 3 years ago 4
Thanks! the song is "Carry on my wayward son" by Kansas.:)
N46RECONXX 3 years ago 2