Search Tutorials
Location damage : If your guy gets shot in the head, he bleeds from the head. If he gets shot in the chest, he bleeds from the chest. etc. Ok, first thing, i've been doing flash since october so i'll explain it so that everyone can understand and to make it easy for everyone, do exactly what's written now and modify it AFTER you're done. 1. Creating Life Alright, start by naming your first layer enemy. In "enemy", draw two seperate body parts : the head and the body and convert both these drawings into ONE graphic symbol. 2. Making the buttons Copy the head, convert it into a button symbol and use the alpha modifier (Windows> Panels> Effect), turn it down all the way to make it invisible. Do the same for the body. Take the head button to a new layer called head button and the body button to another new layer called body button. Original, no? Then, align the buttons on the real enemy. 3. OOPS... I fell...again Go back to the "enemy" layer and on the 1st frame, put a stop action. In frame 2 to 5, make the guy fall and in frames 5 to 10 make him lie on the ground (you will see why later). Copy frame 2 and past it, always in the same layer, on frame 11 and remove the action. In frames 12 to 15, make him fall...again and lie on the ground until frame 20...again. 4. Let's get dirty Now it's tim to add the blood. hehehe. Be as graphic as you like, i don't mind. All i did was create a new layer called blood and in frames 5 to 10, i drew a puddle of blood getting bigger around the head. VERY IMPORTANT : in frames 5 to 10, the blood must be on the head. Next, on frame 10, put a stop action and make a reset button making it start over from frame one. In frames 15 to 20, draw another bloody scene around the body this time and on frame 20, put a stop action and make a reset button making it start over from frame one. 5. Making it happen If you tested it now, you realize that it doesn't work (duh). That's why i kept this step last. Go the the head button frame and put the following actions on the button :
on (release) {
gotoAndPlay (2);
}
Now on the body button, type in the following code:
on (release) {
gotoAndPlay (11);
}
6. Crosshair
(optional...options are good...) Make a new layer called crosshair and and draw a crosshair only in frame one. Make it a movie symbol and put in the following actions :
onClipEvent (enterFrame) {
Mouse.hide();
}
onClipEvent (load) {
startDrag ("", true);
}
And voila, you've got a simple yet effective way of giving your games location damage, making the game more fun for the user and more rewarding to you. Now that you have this info, you can change or modify it to as many body parts as you want. If this doesn't work for some reason, e-mail me and i'll help you the best i can.
Best of luck to you all.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|