MichaelPot
02-22-2008, 12:19 AM
I am creating a game where the user gets to choose from a variety of cars, planes, and other vehicles. You get to drive around using the keys, but I need walls. The following code works for one of my cars, I need a way to for it to apply to all the vehicles. I also would like the walls to be on one layer, and one extended frame, so I don't have to change the walls on every frame when I decide to change it.
onClipEvent (enterFrame) {
if (this.hitTest(_root.beetleCAR)) {
this._y-- ;
}
}
I tried putting the walls for each vehicle on their own frame, but the second code which was:
onClipEvent (enterFrame) {
if (this.hitTest(_root.phantomJET)) {
this._y-- ;
}
}
Yet I then get the error even though it is basically the same. So basically I am trying to combine these two codes together.
Please can you help me.
onClipEvent (enterFrame) {
if (this.hitTest(_root.beetleCAR)) {
this._y-- ;
}
}
I tried putting the walls for each vehicle on their own frame, but the second code which was:
onClipEvent (enterFrame) {
if (this.hitTest(_root.phantomJET)) {
this._y-- ;
}
}
Yet I then get the error even though it is basically the same. So basically I am trying to combine these two codes together.
Please can you help me.