PDA

View Full Version : Script Problems


danbeghin
05-31-2003, 04:48 AM
i'm trying to make an object that can move along the ground, then when it hits the wall or "the line" climb the wall,

heres what i have soo far..

onClipEvent (load){
X=true;
}

onClipEvent (enterFrame){
if (X=true;){
onClipEvent (enterFrame){
if ( Key.isDown (Key.RIGHT)){
this._x+=5;
this._rotation+=5;
}
}
}
}


onClipEvent (enterFrame){
if ( Key.isDown (Key.LEFT)){
this._x-=5;
this._rotation-=5;
}
}
stop ();

onClipEvent (enterFrame){
if (hitTest(_root.line)){
X=false;
}
}

onClipEvent (enterFrame){
if (X=false;){
if ( Key.isDown (Key.RIGHT)){
this._Y+=5;
this._rotation+=5;
}
}
}


try it, for some reason it wont work......

for some other odd reason the ;'s made winkey faces, pay no attention to those :)

farafiro
06-01-2003, 10:05 AM
hi danbeghin
intead of telling you the script, here is a tut for telling you about that
www.bit-101.com/tutorials