HOME | DD

person333 — platform game tutorial

Published: 2006-07-01 00:46:16 +0000 UTC; Views: 10210; Favourites: 156; Downloads: 306
Redirect to original
Description yay i finished!!

hope this helps everyone who wants to make a game


if you do make a game, please give me credit and send me a note with a link
to your game


thanks,

have fun
Related content
Comments: 197

Oddhatt [2015-02-21 06:15:37 +0000 UTC]

Is this for AS3 or AS2? 

👍: 0 ⏩: 1

Oddhatt In reply to Oddhatt [2015-02-22 11:57:00 +0000 UTC]

Nevermind, I figured it out that its AS2.

👍: 0 ⏩: 0

AskYasukeTheFireUser [2013-04-18 03:16:54 +0000 UTC]

((Sorry, I don't have a stop motion code...))

👍: 0 ⏩: 0

AshiKitsuneChan [2013-03-10 14:33:39 +0000 UTC]

omg thank you this was very helpful
ummm I have a question though, you know the "coins" or "stars" you can collect during the game that you con't pass the lvl with out collecting them all, how do I do that? Also, how do I make it so whenever, you collect the coin/star something pops out in your screen?

Sorry I'm kinda pestering you with questions but this is really important.

👍: 0 ⏩: 1

person333 In reply to AshiKitsuneChan [2013-03-11 01:51:48 +0000 UTC]

on each coin you could have something like:

onClipEvent (enterFrame) {
if(this.hitTest(_root.player)){
if(_visible){
_root.coins ++;
_visible = false;
}
}
}

and to make the level complete you could use this to check the amount of coins collected:

if(coins >= 10){
_root.gotoAndPlay("win");
}

👍: 0 ⏩: 0

JohnJensen [2012-12-06 22:35:13 +0000 UTC]

Hey Corey,

I'd like to thank you for making this tutorial. I used this 6 years ago to start getting into ActionScript, and now I'm pretty much trying to make a living off creating indie games in Flash. So thanks for the good start!

👍: 0 ⏩: 1

person333 In reply to JohnJensen [2012-12-09 04:56:51 +0000 UTC]

Hey, No problem Glad it helped. I'm pretty much in the same boat right now, just finished my degree and looking for some sort of work/income.

👍: 0 ⏩: 0

RapunzelT123 [2012-02-14 09:22:12 +0000 UTC]

how do you put a stop action?

👍: 0 ⏩: 1

person333 In reply to RapunzelT123 [2012-02-14 20:26:00 +0000 UTC]

stop();

👍: 0 ⏩: 1

RapunzelT123 In reply to person333 [2012-02-15 06:42:48 +0000 UTC]

? Sorry I don't understand. Do you put "stop();" somewhere or something?

👍: 0 ⏩: 1

person333 In reply to RapunzelT123 [2012-02-15 08:56:25 +0000 UTC]

under the actions for the frame put "stop()" and that should stop the movie playing at that point

👍: 0 ⏩: 1

RapunzelT123 In reply to person333 [2012-02-15 10:28:20 +0000 UTC]

OHHHH thanks!

👍: 0 ⏩: 0

RabidWater [2011-12-04 23:38:55 +0000 UTC]

Hey man, awesome tutorial., one of the few that actually works. I was wondering if you can help me out a little. I'm trying to use this in conjunction with a v-cam, I want the v-cam to follow the player. I have both of them in a movie clip together, but when I run it it all messes up. It's like the code won't work if the player is in a separate movie clip to the ground. I checked and there is a "_root." before every mention of the ground's instance name and it still won't work. Any ideas?

👍: 0 ⏩: 1

person333 In reply to RabidWater [2011-12-05 06:22:17 +0000 UTC]

Not sure about the ground problem, but for the v-cam it has to be on the root layer.
try putting this script in the cam:

this._x = _root.character._x;
this._y = _root.character._y;

👍: 0 ⏩: 1

RabidWater In reply to person333 [2011-12-06 02:52:12 +0000 UTC]

It worked Thanks man!

👍: 0 ⏩: 1

person333 In reply to RabidWater [2011-12-07 10:14:34 +0000 UTC]

No prob, glad to help

👍: 0 ⏩: 0

Sagakure [2011-11-02 07:55:33 +0000 UTC]

A bit difficult to understand at first, but once you get it it's a wonderful tutorial, thank you for making it!!

One question though, how do you make your character run like that in the second frame? On mine everything else works but the character only glides around with the legs in the same position instead of moving the legrs as if he was jumping.
When I tried making an additional frame for him to have two running leg movements, the second one became the jump image, since it was in the place of the third frame. O_o Is there a way to make an animation move in a single frame? *noobish question*

👍: 0 ⏩: 1

person333 In reply to Sagakure [2011-11-05 03:26:34 +0000 UTC]

you need a movieclip inside that movieclip, when he's running it sits of frame 2 so if there's an animated movie clip there it should play as if hes running

👍: 0 ⏩: 1

Sagakure In reply to person333 [2011-11-05 23:05:08 +0000 UTC]

Oh, I had no idea that was possible. It works perfectly now, thank you!!

👍: 0 ⏩: 0

Islands-of-Nicona [2011-02-20 19:54:25 +0000 UTC]

is all this supposed to be on the same layer?

👍: 0 ⏩: 1

person333 In reply to Islands-of-Nicona [2011-02-21 03:01:55 +0000 UTC]

it doesn't matter

👍: 0 ⏩: 1

Islands-of-Nicona In reply to person333 [2011-02-21 16:57:57 +0000 UTC]

ah ok, thanks ^^

👍: 0 ⏩: 0

merdaman [2010-10-16 08:49:50 +0000 UTC]

OMG THIS IS THE ONLY TUTORIAL THAT HAS EVER WORKED I WILL MAKE SURE TO NOTE YOU AND GIVE CREDIT WHEN IM DONE... stupid cap locks

👍: 0 ⏩: 0

KawaiiSairen [2010-09-18 20:05:17 +0000 UTC]

ok i got the instance name now but my person is still falling through the ground but it still stands at the bottom of the screen but if you move around alot then he falls waaaay down

👍: 0 ⏩: 0

KawaiiSairen [2010-09-18 19:41:40 +0000 UTC]

i don't understand how to make a ground T-T
what is an instance?
(sorry i am norwegian)
where do i write ground?

👍: 0 ⏩: 0

5penguins [2010-04-22 04:43:34 +0000 UTC]

Used your tutorial!

It was very helpful.

👍: 0 ⏩: 0

taiyue [2010-04-04 01:59:46 +0000 UTC]

good tutorial, but what does stop action mean?

👍: 0 ⏩: 1

Animefreak0003 In reply to taiyue [2012-10-20 03:43:45 +0000 UTC]

You put the stop action code in the frame's action coding area where you want to stop at. The code is:

stop();

👍: 0 ⏩: 0

ArepaGringa [2010-03-30 01:36:28 +0000 UTC]

didnt work for me

👍: 0 ⏩: 0

Ahmad95 [2010-01-20 20:26:10 +0000 UTC]

Bob is awesome.. Great Tutorial ill use it.. err later on not now you guessed it I procrastinate

👍: 0 ⏩: 0

Momopon [2009-12-03 04:03:09 +0000 UTC]

[link]
with ur tutorial I made this! thanks a lot!

👍: 0 ⏩: 0

LukkiBoi [2009-09-25 04:22:16 +0000 UTC]

omfg soo freakin helpful!

👍: 0 ⏩: 0

Pokalikachi [2009-09-24 02:28:06 +0000 UTC]

thx man for the scrips

👍: 0 ⏩: 0

Pokalikachi [2009-09-24 02:27:16 +0000 UTC]

hooo yes thx for the scrips yes thx master

👍: 0 ⏩: 0

chi-u [2009-08-10 00:56:11 +0000 UTC]

Where's the AS for the ground??

I can''t see it

The rest of the game works great! Buuut he goes through the ground. pls help!

👍: 0 ⏩: 0

klakkid [2009-06-02 21:45:45 +0000 UTC]

how do i make it that when you touch something, something happens? like when you touch a door, gotoAndPlay(3)?

👍: 0 ⏩: 1

person333 In reply to klakkid [2009-06-03 22:38:48 +0000 UTC]

if(_root.door.hitTest(_x, _y, true)) {
_root.gotoandplay(3)
}

pop that on your player, and make sure the doors instance name is "door"

👍: 0 ⏩: 2

klakkid In reply to person333 [2009-06-06 12:54:28 +0000 UTC]

this one doesn't work, either.

👍: 0 ⏩: 0

klakkid In reply to person333 [2009-06-03 23:27:25 +0000 UTC]

oh, thankyouthankyouthankyou!

i REALLY wanted to make a "timed search" game!

on the topic on that, how do i make it so that when a movie clip's animation is over, go to a frame in the main timeline (bolded for emphesis)? or how to create a timer that when it reaches zero go to a frame, say, labled "gameover"?

👍: 0 ⏩: 1

person333 In reply to klakkid [2009-06-04 09:35:41 +0000 UTC]

if you put _root. in front of the action it does it the the main timeline (the root of the movie)

so _root.gotoandstop(3) would go to 3 in the main timeline

you can use it on certain movieclips, say one called "circle"

_root.circle.gotoandstop(3)

if you want it to go to a labeled frame

_root.gotoandstop("framelabel")

hope that helps

👍: 0 ⏩: 2

klakkid In reply to person333 [2009-06-04 18:38:23 +0000 UTC]

one more thing, how do you make it so that when the door is touched, you don't go in until you press up?

👍: 0 ⏩: 1

person333 In reply to klakkid [2009-06-06 07:51:58 +0000 UTC]

onClipEvent (enterFrame) {
if (Key.isDown(Key.UP) and _root.door.hitTest(this)) {
_root.gotoandstop(2);
}
}

👍: 0 ⏩: 2

klakkid In reply to person333 [2009-06-06 12:48:35 +0000 UTC]

oh, it doesn't work. i made the instance name door, and even changed it so that jump is space(which worked.) but when i touch the door, and press up, nothing happens.

👍: 0 ⏩: 1

person333 In reply to klakkid [2009-06-06 19:37:00 +0000 UTC]

what actionscript are you using? cause this is AS1

👍: 0 ⏩: 1

klakkid In reply to person333 [2009-06-06 20:16:25 +0000 UTC]

oh, i have 2.0

how would i make it work in 2.0, do you know?

👍: 0 ⏩: 1

person333 In reply to klakkid [2009-06-06 22:12:19 +0000 UTC]

sorry you'll have to look for tutorials on the net

👍: 0 ⏩: 0

klakkid In reply to person333 [2009-06-06 12:36:01 +0000 UTC]

oh, thanks!

i think that's all i need for this game.

since you helped me with it so much, i'll send you a link when i put it up on DA! thanks!

👍: 0 ⏩: 0

klakkid In reply to person333 [2009-06-04 12:22:18 +0000 UTC]

oh, thanks! exactly what i was looking for!

👍: 0 ⏩: 0

cinnamonsid [2009-03-15 16:48:38 +0000 UTC]

This is great, I got it to work, but I have a question. If I fall with half of a player on a platform, it will fall... how can I solve that?

👍: 0 ⏩: 1

person333 In reply to cinnamonsid [2009-03-16 02:56:37 +0000 UTC]

it should say in the tutorial, you need to move the registration point of the character

👍: 0 ⏩: 0


| Next =>