Search tutorials
ok i had trouble making a health bar until i found out how to use tell target properly. also i need to know 1 more thing, if you know how to use telltarget to make a button inside a clip go to a frame in a different scene then email me at thunderdude56@yahoo.com.
well lets get down to buisness. first you want to make your health bars layout. so press insert>new symbol.make it a movie clip named health. on the first frame make what your bar would look like when it is full, then in the next one remove one section of the bar, etc. etc. until it is empty.
insert a layer and put the stop action on each frame of itgo back to the main timeline and put the health bar somewhere on the stage. then open the instance panel(ctrl-I) and name it health.
ok now press insert>new symbol and make it a movie clip named enemy.draw an enemy(whatever you want it doesn't matter). then select the 24 frame and press F6. then on the 24th frame draw a bang from the gun or whatever it would like when they are 'attacking'.on this frame open the actions panel.press ctrl-e for expert mode and type in the following code:
tellTarget ("/health") {
nextFrame ();
}
notice the use of /, this is used in names.the health does not refer to the movie clip,
but to its name when you put it in the instance panel. now put the enemy MOVIE CLIP on the
stage and it should show it waiting for two seconds(if your movie is 12fps) and then
attacking, then your health bar should go down by 1.
THIS MAY BE FOUND IN SCENE 1 OF THE TUTORIAL FILE.
-NOTE- if you want to be able to shoot/hit/defeat the enemy, edit the movie clip and make the picture in frames 1-23 a button. then apply this code to it:
tellTarget ("_level0") {
nextFrame ();
}
the _level0 means main timeline(also note that it is not leve10 but level0)
then on the next frame make another enemy. put a stop action on both frames in the main timeline and you got a two enemy shooting health game.
THIS MAY BE FOUND IN SCENE 2 OF THE TUTORIAL FILE
hope this helped.
| » Level Basic |
|
Added: 2003-11-13 Rating: 4 Votes: 13 |
| » Author |
| i AM BuG |
| » Download |
| Download the files used in this tutorial. |
| Download (4 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!