Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 Viewsok so, im making a movie, and i have this sword in it. in yoyo vs FLLFFL in the credits it says sword trail script by such n such. does anyone know that script?
Stupid question, make stuff yourself, don't rip off other people.
I'd answer you if you were asking how to make a sword trail.
Certified audiophreak, lv 60.
i tried to make a sword trail script. i also tried making a sword trail. both failed. i'm sorry but this is all i've got left. please i need that script. im not asking you personally just anyone who knows it or knows how to make a script that would work.
Specify what you're after. What exactly does the trail look like?
Anyway, I made this in a few minutes:
Since you're not a programmer, I won't insist on explaining it to you
if (_parent.stopper != true) {
var numofoldobjects:Number = 2;
var alphabits:Number = 100/(numofoldobjects+1);
var oldarray:Array = new Array();
for (i=0; i<numofoldobjects; i++) {
oldarray.push(i);
}
_parent.stopper = true;
onEnterFrame = function () {
this.duplicateMovieClip("oldsword"+oldarray[0], oldarray[0]);
with (_parent["oldsword"+oldarray[0]]) {
_x = oldx;
_y = oldy;
_rotation = oldrotation;
}
oldx = this._x;
oldy = this._y;
oldrotation = this._rotation;
for (i=0; i<oldarray.length; i++) {
_parent["oldsword"+oldarray[i]]._alpha = 100-alphabits*(i+1);
}
nextnum = oldarray.pop();
oldarray.unshift(nextnum);
};
}
Put that on the ONLY frame in the timeline of whatever you want to create a trail for.
You can change the numofoldobjects value if you want to; that will increase or decrease the number of trail things you'll have.
Doomsday-One, working on stuff better than preloaders. Marginally.
sweet, thanks soo much! basicy what i was after was whenever i moved this one simbol it would leave a trail, kinda how like in video games when you swing a sword it leaves a little trail. so with this code what do i do exactly?
Examples:
Normal
At 1fps
.fla file
I've made some changes to the code (it now works on multiple objects, and the alpha is better).
Oh, and set your AS language to 2.0 to make it work (In Publish Settings).
The code should be placed on the timeline of the object you want to have this effect for. Double click on one of my movieclips, and you'll see an 'a' on the keyframe I put the code on. Then open the actions panel (F9), and put the code there.
// Code by Doomsday-One, because I'm awesome =]
if (this.getDepth()<0) {
var numofoldobjects:Number = 5;
// You can change the above number to change how much the object trails
if (_root.depth == undefined) {
_root.depth = 0;
}
mindepth = _root.depth;
_root.depth += numofoldobjects;
var alphabits:Number = 50/(numofoldobjects+1);
var oldarray:Array = new Array();
for (i=0; i<numofoldobjects; i++) {
oldarray.push(i);
}
oldx = this._x;
oldy = this._y;
oldrotation = this._rotation;
onEnterFrame = function () {
this.duplicateMovieClip("oldsword"+oldarray[0]+mindepth, oldarray[0]+mindepth);
with (_parent["oldsword"+oldarray[0]+mindepth]) {
_x = oldx;
_y = oldy;
_rotation = oldrotation;
}
oldx = this._x;
oldy = this._y;
oldrotation = this._rotation;
for (i=0; i<oldarray.length; i++) {
_parent["oldsword"+oldarray[i]+mindepth]._alpha = 50-alphabits*(i+1);
}
nextnum = oldarray.pop();
oldarray.unshift(nextnum);
};
}
Have fun with it!
And I hope that's what you're after
Oh, and you can change the '50's too (between 0 and 100), and that will effect how see-through the objects are.
Doomsday-One, working on stuff better than preloaders. Marginally.
I have a flash file here! I can't give u the script, only the flash file.
(P.S.: it only works on actionscript 1.)
http://up2share.com/file/33mqufznm2r632_
Sword_and_Yoyo_test.fla
did you mean something like this? http://spamtheweb.com/ul/upload/3808/539 07_sword.php
hey when I put the animation it says: Error: Unable to perform action 'with' because the object does not exist. what can I do?
At 2 days ago, vml wrote: hey when I put the animation it says: Error: Unable to perform action 'with' because the object does not exist. what can I do?
you dont
At 2 days ago, vml wrote: hey when I put the animation it says: Error: Unable to perform action 'with' because the object does not exist. what can I do?
You managed to bring a thread back from the dead - surely you can manage to use this script.
At 2 days ago, vml wrote: hey when I put the animation it says: Error: Unable to perform action 'with' because the object does not exist. what can I do?
Learn to program instead of just copying code. It will not teach you anything.