Hi y’all. I’m a complete beginer at flash and was wondering if i could get some help.
I’m designing a simple game in cs3 with actionscript 2.0 and i would like to get a second movie clip trailing my “hero” but only when it passes over it (or collects it), and again drop it when the hero comes in contact with another movie clip.
I can get an object to trail, but thats as far as i’ve got. i cant think how to only trail once the object has been collected by the “hero”.
code (from a web example) - this is placed in the actions file of the trailing object;
onClipEvent(enterFrame){
diffx = _root.herod._x - this._x ;
diffy = _root.herod._y - this._y ;
_x += diffx/5 ;
_y += diffy/5 ;
}
this is placed in the player action file “herod”
diffx = _root._xspeed - this._x ;
diffy = _root._yspeed - this._y ;
_x += diffx/5 ;
_y += diffy/5 ;
i have played around with setting boolean statements and hit tests but to no avail, as i’m not sure which statements should be in which clip action file.
Any help would be hugely apriciated.
Thanks for looking…