simple platformer tutorial [Flash][Actionscript]
Started by: skazzi | Replies: 57 | Views: 14,529 | Closed
Nov 9, 2005 10:26 AM #1964
Thanks. Cool tutorial, helped alot.
Dec 16, 2005 9:56 AM #2824
Ok, that helped a lot. But how do I make pickups, and levels, etc?
Dec 16, 2005 1:16 PM #2826
Quote from The ScarecrowOk, that helped a lot. But how do I make pickups, and levels, etc?
http://stickpage.com/vb/showthread.php?t=16753
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]
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]
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: Nov 2025
Posts: 0
Joined: Nov 2025
Feb 25, 2006 7:13 PM #5097
my player just falls straight through the platform.
bazookapenguin
Posts: 0
Joined: Nov 2025
Posts: 0
Joined: Nov 2025
Feb 25, 2006 7:17 PM #5098
Quote from The ScarecrowSweet. 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
Feb 25, 2006 7:21 PM #5099
Right click, play.
Naughtynoobnob
Posts: 0
Joined: Nov 2025
Posts: 0
Joined: Nov 2025
Feb 25, 2006 7:29 PM #5101
my player falls straight through my platform
bazookapenguin
Posts: 0
Joined: Nov 2025
Posts: 0
Joined: Nov 2025
Feb 25, 2006 7:47 PM #5103
no you go into the wall and it will push you upwards^_^Quote from FrAnKeHRight click, play.
Naughtynoobnob
Posts: 0
Joined: Nov 2025
Posts: 0
Joined: Nov 2025
Feb 25, 2006 7:55 PM #5104
i still dont know why my player goes straight through my platform :s
Mar 24, 2006 8:27 AM #6448
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: Nov 2025
Posts: 0
Joined: Nov 2025
Mar 24, 2006 3:02 PM #6454
yes there is look at mickey's hittest tut
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
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