View Full Version : Platformers
ChibiWurld
12-23-2004, 09:22 PM
I'm not entirely new to Flash games. I've made first person shooters and other games but i want to make a platforming game. Can anyone help me out? I need to know how to make a character jump and how to make a ground that you can walk on. Also if someone can tell me how to make a character like run when you press the left key. Or something like that. Thank you in advance.
Bodadem
12-23-2004, 10:58 PM
This (http://www.flashkit.com/tutorials/Games/Creating-baz_prod-1052/index.php) looks fairly complete and should answer your questions. Feel free to post anything it doesn't answer, and I'm sure someone will be able to answer it.
ChibiWurld
12-24-2004, 12:52 AM
it is a good tutorial but i cant get the platforms right.
my character keeps falling through them.
It wont even stay on the floor =/
edmarriner
12-24-2004, 08:47 AM
where it says :
if (_root.platform.hitTest(_x, _y, true)) {
air = false;
} else {
air = true;
}
make sure " platforms " is the is the right name.
{note: also , what version of flash are you using and what flash player are you exporting to? }
Bodadem
12-24-2004, 10:13 AM
What he is saying is make sure your platforms have the correct instance name.
ChibiWurld
12-24-2004, 10:16 AM
MX and Flash Player 7
but i got it to work. Well im trying to get an enemy in there and i have an hp bar. Im trying to use a hitTest to make the hp bar go to the next frame.
if (this.hitTest( _root.hero ) ){
_root.hp.nextFrame();
}
Please tell me whats wrong with it.[/code]
Jonanin
12-24-2004, 11:31 AM
Make sure all your objects have the correct instance name. Also, you put that code on the enemy right? I made my own little thing, using your code, and it worked.
denacioust
12-24-2004, 04:15 PM
if (this.hitTest(_root.hero) ){
_root.hp.nextFrame();
}
Make sure that the hero mc has an instance of hero
Bodadem
12-24-2004, 08:18 PM
And make sure the health bar has the instance name "hp"..
ChibiWurld
12-27-2004, 02:16 AM
This is messed up big time. All the instance names are right. It still wont work
This is messed up lol
eatmorchikin6464
12-27-2004, 10:25 AM
You might need a tellTarget in there....
tellTarget ("hp") {
nextFrame ();
}
Or, you need to make sure that that AS is on the enemy, not there hero.
The Brown Cow
12-27-2004, 12:32 PM
tellTarget won't make any difference, it's just an older way of doing the same thing.
Your hp bar is on the main timeline, yes?
You have the enemy code in an onEnterFrame handler (clipEvent)?
Your health bar is tweened properly, has enough frames and whatnot?
denacioust
12-27-2004, 05:32 PM
The enemy code is in a movie clip not a button?
Bodadem
12-27-2004, 06:36 PM
Upload the .fla and post a link, we can then take a look at it and tell you what's wrong. MUCH easier than us just guessing.
ChibiWurld
12-27-2004, 11:59 PM
Oh i figured out what was wrong. Thanks for your help.
Bodadem
12-28-2004, 10:24 AM
That's why we're here.
theneedforsex
01-11-2005, 06:31 AM
I have another problem... My character just falls to the middle of the platform, then stops... You can walk back and forth. But you can't jump!
Any suggestions?
ps. my version is MX 2004 Pro.
bobmasedo
01-11-2005, 08:11 AM
is the whole platform a movieclip?
theneedforsex
01-14-2005, 12:38 PM
Yeah it is... And All the instances have the right name!
denacioust
01-14-2005, 01:39 PM
Show the code you're using and I'll see whats goin on
theneedforsex
02-01-2005, 06:47 AM
Okay, i don't have web-acess on the P.C. i work with, so that's a bit difficult. But as soon as i'm at some internet-based-LAN-party... I'll do it
:D
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.