Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-18-2008, 08:26 PM   #1
987456321
Registered User
 
Join Date: Oct 2008
Posts: 7
Question i need to make a tail/trail/following thing

in other words... asteroids have that "tail" behind them thats what i need.
in different words... i have a shape ( circle) and i am going to make a game but i need it to have a thing that shows where it was for the past 3 seconds. does anybody know a script or something that could make this happen?
987456321 is offline   Reply With Quote
Old 10-18-2008, 08:44 PM   #2
Draxus
Registered User
 
Join Date: Sep 2007
Posts: 21
Default

No code, but you could just create a small trail particle movieclip/sprite at the asteroids location every frame, and set it to slowly alpha down over a few seconds and then destroy it when it hits 0 alpha. I'm assuming you don't need the trail particles to have momentum or anything, just appear as part of a path that the asteroid is laying down.
Draxus is offline   Reply With Quote
Old 10-18-2008, 09:30 PM   #3
987456321
Registered User
 
Join Date: Oct 2008
Posts: 7
Default

well i was kinda hoping of some code or something more in-depth (im a new programmer) also the "asteroid" will be following the x and y position of the mouse so that might make it harder
987456321 is offline   Reply With Quote
Old 10-18-2008, 10:37 PM   #4
zompo
Registered User
 
Join Date: Oct 2008
Posts: 34
Default

Are you using actionscript 2 or 3?
zompo is offline   Reply With Quote
Old 10-18-2008, 11:49 PM   #5
987456321
Registered User
 
Join Date: Oct 2008
Posts: 7
Default

Quote:
Originally Posted by zompo View Post
Are you using actionscript 2 or 3?
as2 so ya 2
987456321 is offline   Reply With Quote
Old 10-19-2008, 12:01 AM   #6
zompo
Registered User
 
Join Date: Oct 2008
Posts: 34
Default

okej, then just make a a movieclip whit a circle or something that fades out, make it so the fade last for about 3 sec, at the end of that movieclip add this.removeMovieClip(); and add it to the library with name "tail". then in your enterframe loop attach the movieclip "tail" with option {_x: _root._xmouse, _y: _root._ymouse } or {_x: astroid._x, _y: astroid._y}
zompo is offline   Reply With Quote
Old 10-19-2008, 12:54 AM   #7
987456321
Registered User
 
Join Date: Oct 2008
Posts: 7
Default

i have no idea what that means ...well a bit but not really (i am New to programming)
987456321 is offline   Reply With Quote
Old 10-19-2008, 01:10 AM   #8
zompo
Registered User
 
Join Date: Oct 2008
Posts: 34
Default

Ok, do you got any code atm, like tha asteroid following the mouse? or do you need code for both that and the asteroid tail?

If you got code then post it here and you might get some more help
zompo is offline   Reply With Quote
Old 10-19-2008, 02:42 AM   #9
EightySeven
Senior Member
 
Join Date: Aug 2008
Posts: 134
Default

Trail's I've found to be more processor/calculator intensive.

What I would do isI only know AS3)

1) make a movie clip of a small portion of the trial
2) have an on enter frame function that tracks the players(or asteroids) past and present position
3) have a timed function(I know in AS3 its possible donno about 2) that puts a new segment of the trail on screen. from the player(objects) privious positino to its present position.

No In this I've always used simple vectors so i could scale them if the player was moving REALLY fast, another solution might be to reduce the timed function to make it tick faster.

For asteroids I would just do a particle effect generator ontop/beneath the asteroid image.

so just an image of a piece of debris that is randomly scaled/rotated/directed behind the asteroid
EightySeven is offline   Reply With Quote
Old 10-19-2008, 11:26 AM   #10
987456321
Registered User
 
Join Date: Oct 2008
Posts: 7
Question

right now i dont have the asteroid to follow the mouse but would it help if i did... would it be easier if the asteroid was only a red square and i needed the copies of itself to follow it buy get smaller and alpha away (i dont know what that means but apparently its something with it disappearing)
987456321 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to make a morphing star system, need some help/advice. bar10dr ActionScript 2.0 6 08-25-2012 08:50 PM
how to make sub menus in Flash 8? kb1 Flash 8 General Questions 7 04-18-2007 11:09 PM
Riley's Diary- how to make... orangedroplet ActionScript 1.0 (and below) 1 02-27-2007 10:32 PM
Why everyone hates (or should hate!) mircosoft stealthelephant General Chat 100 01-07-2005 01:17 PM
make a movie clip act as a button paolo1234567891 ActionScript 1.0 (and below) 56 09-07-2003 10:50 PM


All times are GMT. The time now is 07:04 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.