Forum rules
IMPORTANT
This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.
[Request] Another movieclip to follow another
Author |
Message |
Clyde02
Joined: Wed Nov 26, 2008 10:43 am Posts: 16
|
Is there a code for that in AS 2.0,Cause I'm using it so the vcam can follow the character in my game,so is there? And another code to follow multiple chars aswell
|
Sun Jan 25, 2009 3:04 pm |
|
|
hitori masurao
Joined: Mon Aug 11, 2008 7:20 pm Posts: 28 Location: Here, there, Everywhere.
|
_________________*adopted by [RANDM] and Kirby_Wins*
|
Sun Jan 25, 2009 3:45 pm |
|
|
Clyde02
Joined: Wed Nov 26, 2008 10:43 am Posts: 16
|
thanks but no,it didn't
|
Sat Jan 31, 2009 1:57 pm |
|
|
R.E.B.
Joined: Thu Jan 15, 2009 8:32 pm Posts: 87 Location: En Ja Moma *wink* * wink*
|
_________________Currently : Developing A Super Mario Solar Star Engine My ssf2 Main :
|
Sat Jan 31, 2009 7:25 pm |
|
|
racoon
Joined: Sun Sep 28, 2008 6:46 pm Posts: 51
Gender: Anime Girl
|
Well for one, read the tutorial that R.E.B submitted. That will help with the identifying the dupes. Now dependent on how the movieclip will follow your character, the code need changes. If its a platformer the AI needs to recongize walls, jumps and well platforms. If its a free view, like over the head 3d roaming movement, then it might be as simple as if(this._x<_root.guy._x){_x+=3}...etc. However depending on how much depth you want to go on with the project yo'll have to figure out the many circumstances that the computer AI will face. After you identify the scenarios then you can begin to properly code what you want. That's my bit of two cents. If you can give me more info I can try to help some more. However I too am currently facing this problem and trying to decide how to create A competent AI structure.
_________________Would you kindly go here clicky and read at least the first few paragraphs
|
Sat Jan 31, 2009 10:00 pm |
|
|
Clyde02
Joined: Wed Nov 26, 2008 10:43 am Posts: 16
|
Ok here is how it works,I have a gun and a dot,I programmed the gun to shoot and i want it to follow the dot like some fairy or sumthing.That way while the dot is moving i can just click and shoot(i already programmed the click and shoot)so with the code i can have the gun following instead of standing there.
|
Sat Feb 14, 2009 12:49 pm |
|
|
racoon
Joined: Sun Sep 28, 2008 6:46 pm Posts: 51
Gender: Anime Girl
|
So wait, are you saying that the "gun" is basically being held by the "dot"? If that's the case all you have to say is that (_root.gun._x=_root.dot._y;_root.gun._y...etc). If that is not what you meant then I'm sorry but I'm a bit confused at your post.
_________________Would you kindly go here clicky and read at least the first few paragraphs
|
Mon Feb 16, 2009 7:49 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|