Jump to content


Photo

Collision


  • Please log in to reply
3 replies to this topic

#1 Pattt

Pattt

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 27 October 2004 - 09:43 AM

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!

#2 Underground D

Underground D

    Young Padawan

  • Members
  • Pip
  • 54 posts

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

#3 CoryMathews

CoryMathews

    P2L Jedi

  • Members
  • PipPipPip
  • 554 posts
  • Gender:Male
  • Location:Texas

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.

#4 TikiMan02

TikiMan02

    Young Padawan

  • Members
  • Pip
  • 14 posts

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);
}





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users