View Full Version : avalche type games
Jshaw71
11-14-2004, 09:42 PM
I was wondering how do you do those avlache type games, using a life bar
Bodadem
11-14-2004, 09:47 PM
Mind giving a link to a sample of said game?
Jshaw71
11-15-2004, 07:07 PM
Mind giving a link to a sample of said game?
I cannot seem to find any links of it anywhere's weird, basically it's the screen is contanstly scrolling and if you hit items you die, some avalache type games have you loose health...
Bodadem
11-15-2004, 07:38 PM
I'm sorry, I don't know what you're talking about...
The Brown Cow
11-15-2004, 08:01 PM
Like this? http://www.albinoblacksheep.com/flash/avalanche.php
ABC123
11-15-2004, 08:19 PM
Ohhhh, avalanche, I was wondering what the heck he was talking about. "Avlache", last I checked, that wasn't a word.
Freddy
11-16-2004, 03:11 PM
like patrik's old game
MercuryLime
11-16-2004, 03:17 PM
My game was based off of the one TBC just linked to.
eatmorchikin6464
11-16-2004, 03:42 PM
Well, since know one else will answer this, this is how you do it.
Make a health bar, character, and an enemy. Then, with the health bar, select the color fill used and convert it to an MC called health. Double click the health MC to go to it's edit center. You will need to make it about 20-100 frames long depending on how much health you want the person to have. (20=little health, 100=big health). Now, create a motion tween on those frames. Now you will need to edit the sizes. On frame one, make the bar full, and on the last frame, make the bar empty. This is the boring part. You will need to highlight every frame, right click, then go to Insert Keyframe. That will make every frame a key frame. Then, you can highlight all the frames again and remove the motion tween, since it wont be needed anymore. Finally, put this code on each frame:
stop();
If you play your animation, the bar should deplete and you are done with editting this MC.
Go back to the Main Timeline and select the character. Make that and MC called man. You will not need to edit this at all.
Next, go to the enemy and select it. Make him an MC and now we will begin changing his code. Go to the new MC's actions by pressin F9. Now, you will need to insert this code:
onClipEvent (enterFrame) {
if (this.hitTest( _root.man ) ){
tellTarget ("_parent.=health") { nextFrame ();
}
}
}
What this does it makes it so that as long as the enemy is touching the man, the health will continue to deplete, let's disect the code now!
onClipEvent (enterFrame) {
This is called a Handler. It will tell flash when to run the code, you will always need a handler.
if (this.hitTest( _root.guy ) ){
This is just a simple hitTest. It is saying, if this MC touches, that MC, then....
tellTarget ("_parent.health") { nextFrame ();
This tells the target called health (our healthbar) to go to the next frame everytime the hitTest is true.
Bodadem
11-16-2004, 05:08 PM
Very nice. Couldn't have said it better myself. Probably.
Cept..I think he was looking for how to make the whole game...Not just the health bar bit..But a very nice health bar bit, none the less!
arkhan
11-16-2004, 05:15 PM
I dont think a health bar need to be that much complex..a simple
if(guy.hitTest(enemy)){
healthBar._x-=healthBar/100
if(healthBar._x <=0){
die()
}
}
I think this should do the health bar thingy..
Bodadem
11-16-2004, 05:27 PM
I suppose...EMC's way is nicer though...using motion tween......
eatmorchikin6464
11-17-2004, 04:38 PM
Yay! I got a good response. Well, I could explain how to do the avalanche games, but it would be a waste of time. Here is what I can give you:
Don't try and start a game right now, at the beginning of your flash career. You need to wait until you have an understanding of AS and other things in flash. Let me use myself as an example. I first started flash a lil less than a year ago to participate in a flash contest on Xgen, and here is what it looked like:
http://www.freewebs.com/chickenslayerproductions/a%20walk%20%20in%20the%20park.swf
But now, after being patient and learning a little bit, I could make a whole avalanche game right now. If I had a whole day, I could probably complete it with a few hours left. Whats best of all, I wouldnt have to go to people and ask how to do things, because I'm advanced enough that I know. Also, the graphics would be alot better than on my first movie, and it would be more entertaining to play. So, in conclusion, you might want to ride it out a lil longer before starting on a big game, so you wont need to ask people how to make the whole thing.
Bodadem
11-17-2004, 05:42 PM
OH...MY..GOD...That has got to be..THE greatest movie...EVER! cept that you saved it with spaces in the name...WHAT A NOOB! LOL!
eatmorchikin6464
11-18-2004, 03:27 PM
Hey! it was a long time ago, what can I say?
Bodadem
11-18-2004, 10:05 PM
Hmmm...What indeed?
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.