Hi..
I'm working with a game, and I need some help...
In the game is the player a "car", and when it drives over a symbol, the movie gonna jump to another frame...!
How can i do this?
I've do so the car is driving (the arrow-buttons).
Please help!
Collision
Started by
Pattt
, Oct 27 2004 09:43 AM
3 replies to this topic
#1
Posted 27 October 2004 - 09:43 AM
#2
Posted 27 October 2004 - 09:13 PM
So you've basically used a movement tut? well, head over to flashkit.com go to tuts >games > and look for your topic, I tried once making a game , got the guy to walk, have a helath bar, points, but couldn't set his boundaries so i gave up.
unelss of course this site has a tut on it somewhere
unelss of course this site has a tut on it somewhere
#3
Posted 20 March 2005 - 04:51 AM
you need to set a hittest. a hit test tells you when one object is hitting another hints the name. the code for this is
if (this.hitTest(VarName)) {
}
you put this code on one of the 2 mc's that you are trying to detect and put the other movieclips name in place of VarName. now to make it go to another frame you just modify the code to say
if (this.hitTest(VarName)) {
gotoAndPlay(6);
}
And of course you will replace the 6 with your desired frame.
if this doesnt help or you have another question feel free to email me at [email protected] and i will try and help you out.
if (this.hitTest(VarName)) {
}
you put this code on one of the 2 mc's that you are trying to detect and put the other movieclips name in place of VarName. now to make it go to another frame you just modify the code to say
if (this.hitTest(VarName)) {
gotoAndPlay(6);
}
And of course you will replace the 6 with your desired frame.
if this doesnt help or you have another question feel free to email me at [email protected] and i will try and help you out.
#4
Posted 21 March 2005 - 01:10 PM
well actually if ur pasting the code into a movie clip it would look like this.
if(hitTest(this._parent.instance name)) { _root.gotoAndPlay(6); }
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users