-
help making player go to next level
I'm working on a plaform game and i have an object that when the player touches it i want it to take it to the next level, how do i do that?
-
For such a generic question, I can only recommend that your search this site's tutorials. Maybe search for "hitTest."
-
This code goes on your charecter.
End is the name of the movieclip of which your charecter will run over when the level is finished
Code:
if (this.hitTest(_root.end)) {
level++
//Putting here whatever you're going to put to make it go to the next level.
}
But as stated above, this is such an extremly generic quetion, it's hard to know what you want. Consider posting your flash file, so we can know what you want.
At any rate, look up HitTests.
This is where I put lyrics to songs everyone likes and things I find witty.
I type with a British and Canadian accent. Eh, got it mate?
-
I tried that hittest already and it doesn't work. I still don't know what to do.
-
Originally Posted by aSlick
I tried that hittest already and it doesn't work. I still don't know what to do.
Did you put this code on your player?
Is the invisible movieclip that he runs in to called end?
Did you put something like
Code:
gotoAndPlay(whateverframeisthenextlevel)
This is where I put lyrics to songs everyone likes and things I find witty.
I type with a British and Canadian accent. Eh, got it mate?
-
Senior Member
I did a crappy tutorial on 'hotspots' a while back. Search that under flash Game Tutorials on this site if your still stuck.
-
Hsalf
What Bluethunder1 posted should have worked... can you give us an .fla so we can see the problem easier?
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
|