Stick Page Forums Archive

simple platformer tutorial [Flash][Actionscript]

Started by: skazzi | Replies: 57 | Views: 14,529 | Closed

Fretspider
2

Posts: 206
Joined: Sep 2005
Rep: 10

View Profile
Nov 9, 2005 10:26 AM #1964
Thanks. Cool tutorial, helped alot.
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Dec 16, 2005 9:56 AM #2824
Ok, that helped a lot. But how do I make pickups, and levels, etc?
FrAnKeH
2

Posts: 602
Joined: Aug 2005
Rep: 91

View Profile
Dec 16, 2005 1:16 PM #2826
Quote from The Scarecrow
Ok, that helped a lot. But how do I make pickups, and levels, etc?



http://stickpage.com/vb/showthread.php?t=16753
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Dec 18, 2005 3:14 AM #2851
Sweet. Thanks, the both of yous, Here's my game I made, incomplete, but still...

Oh yeah, and if you fall through the floor just jump a few times, you'll come back. But if you go through the roof, you'll need to right click, back a frame and do the previous level again. There's only 7 levels at the moment.

It's called: "Escape"

[SWF="http://i30.photobucket.com/albums/c329/scarecrow69r/Platformgame.swf height=400 width=550"]http://i30.photobucket.com/albums/c329/scarecrow69r/Platformgame.swf height=400 width=550[/SWF]
FrAnKeH
2

Posts: 602
Joined: Aug 2005
Rep: 91

View Profile
Dec 19, 2005 6:39 PM #2865
onClipEvent (load) {
y = jump=0;
speed = 5;

}
onClipEvent (enterFrame) {
this.stop()
xmax = this.getBounds(_root).xMax;
xmin = this.getBounds(_root).xMin;
ymax = this.getBounds(_root).yMax;
if (Key.isDown(Key.RIGHT) && !_root.ground.hitTest(xmax+speed, _y, true)) {
_x += speed;
this.play()
}
if (Key.isDown(Key.LEFT) && !_root.ground.hitTest(xmin-speed, _y, true)) {
_x -= speed;
this.play()
}
if (_root.ground.hitTest(_x, ymax-(y/2), true)) {
jump = true;
y = 0;
} else {
y -= 2;
jump = false;
}
if (jump && Key.isDown(Key.SPACE)) {
y = 13;
}
_y -= y;
}


The bits ive highlighted can be added to make him not run all the time.
Naughtynoobnob

Posts: 0
Joined: Jul 2025
Feb 25, 2006 7:13 PM #5097
my player just falls straight through the platform.
bazookapenguin

Posts: 0
Joined: Jul 2025
Feb 25, 2006 7:17 PM #5098
Quote from The Scarecrow
Sweet. Thanks, the both of yous, Here's my game I made, incomplete, but still...

Oh yeah, and if you fall through the floor just jump a few times, you'll come back. But if you go through the roof, you'll need to right click, back a frame and do the previous level again. There's only 7 levels at the moment.

It's called: "Escape"

[SWF="http://i30.photobucket.com/albums/c329/scarecrow69r/Platformgame.swf height=400 width=550"]http://i30.photobucket.com/albums/c329/scarecrow69r/Platformgame.swf height=400 width=550[/SWF]

Ive figured out a cheat $_$ but i shalt not telleth thou
FrAnKeH
2

Posts: 602
Joined: Aug 2005
Rep: 91

View Profile
Feb 25, 2006 7:21 PM #5099
Right click, play.
Naughtynoobnob

Posts: 0
Joined: Jul 2025
Feb 25, 2006 7:29 PM #5101
my player falls straight through my platform
bazookapenguin

Posts: 0
Joined: Jul 2025
Feb 25, 2006 7:47 PM #5103
Quote from FrAnKeH
Right click, play.
no you go into the wall and it will push you upwards^_^
Naughtynoobnob

Posts: 0
Joined: Jul 2025
Feb 25, 2006 7:55 PM #5104
i still dont know why my player goes straight through my platform :s
ilike2game
2

Posts: 5
Joined: Dec 2005
Rep: 10

View Profile
Mar 24, 2006 8:27 AM #6448
Image
Is there an action script code that will make it so if you land on a certaint platform youll progress to a new lvl because i would love to make a platform game.
bazookapenguin

Posts: 0
Joined: Jul 2025
Mar 24, 2006 3:02 PM #6454
yes there is look at mickey's hittest tut
Sparco
2

Posts: 251
Joined: Aug 2005
Rep: 48

View Profile
May 27, 2006 4:25 PM #10436
back to ayyg's question i know how to do this but the guy wont move forward whilst in the animation
allyman8

Posts: 95
Joined: May 2006
Rep: 10

View Profile
Jun 6, 2006 5:21 AM #10943
can u use 3d flash animator to do that u can add scripts with it i need to learn some scripting i need a mentor for actionscript realy
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.