|
-
Need Fast Help!!
Well, i wanted to edit the (example)game of http://www.kirupa.com/developer/mx20...tform_game.htm. The screen of the game scrolls if u go right or left, but it doesn't when you jump or go down? How can i change that?
And is there a way that if that round that you play touches an item, he will begin somewhere else and all the bricks and walls etc. are changed (in other words, is it possible to do that when it hits something, you will go to the next level).
-
The screen goes left and right because of the code:
PHP Code:
_root._x -= speed;
// and
_root._x += speed;
So to make the screen go vertical, you will need to change the x to y for when you press the up and down key. As for the possibility of hitting something, it's obviously from the example you linked that there is a way to check for 'hitting'.
The term you're looking for is called hitTest, and I would suggest looking it up. You wouldn't find a problem because there are MANY tutorials online. Here is one to help get you started:
http://www.kirupa.com/developer/acti...pt/hittest.htm
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
|