Hi !
I know you all have been waiting for hit tests tutorial, so here i will teach you simple hittests.
The easiest way to use a hit test is:
if (_root.ball.hitTest (this)) {
______________;
}
this actions should go inside a enter frame onclipevent handler, inside a movieclip.
what it means is that if the symbol named ball touches this movieclip, something is gonna happen.
It's pretty easy, but it will only work really good with squares and rectangles.
A more advanced use of hiTests is;
if (_root.ball.hitTest (_x,_y,true) {
____________;
}
it says that if the ball touches this symbol's X and Y position, something happens. You can change x and Y to fit your needs. When we start tutorials (very soon), you will see how hittest works =]
well, this post was short, but important. Now you certainly have all tools to make a good game. But if you think you still aren't able to make your own game, wait a few days, cause i will start a tutorial.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment