-
Senior Member
Collision help, yeah im new to flash8
k, ill get to the point
**Error** Symbol=endportal, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
if (endportal.hitTest(_root.char)) {
i have a Platformer game that has 2 main frames one is one level the 2nd frame is the other level, i want it so that if it hits the portal it will play frame 2
i have frame1 on on "stop();"
and then when it hits the portal it is play(); then says stop(); again on frame 2
all help is great
~sada~
-
Senior Member
More information on your script, please.
- The right of the People to create Flash movies shall not be infringed. -
-
**Error** Symbol=endportal, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
if (endportal.hitTest(_root.char)) {
so far- your code is fine! however you seem to have placed it in some arbitrary place.
in games, most checks have to happen within a main game loop - this means all of your collision as well. If you have main game loop, paste your code into that instead of where you have it now. IE:
this.onEnterFrame{
//my game stuff
if(endportal.hitTest(_root.char)) {
gotoAndPlay("level2",1);
}
-Mike
-
Senior Member
Yes, i realize now what i did thanks for all your help
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
|