-
Has anyone seen a script for a platform game that moves up and down.
So when the player jumps onto the platform he moves up and down with it????
like the TAMALE LOCO game on shockwave.com
-
i have been working on this myself. i used MadSci's platform code to make a game. In my platform the moves up & down (it is a movie clip that just goes up & down), i gave it these actions:
onClipEvent (enterFrame) {
my_top = this._y-this._y/2;
if (hitTest(_root.hero) and _root.hero.b_edge < my_top) {
_root.hero._y = _root.hero._y-15;
_root.hero.platform = "on";
}
}
It is basically the same as the platforms that don't move's code, but i changed:
_root.hero._y = _root.hero._y-12;
to:
_root.hero._y = _root.hero._y-15;
this will move the hero up slightly more than if he was standing on a non-moving platform. If u leave it at 12, then the hero will fall thru. It has some bugs, as the hero will not perfectly sit on it, he will move up faster than the platform moves. If anyone know a better way, then please post a reply.
-
Thanks. I will try it out. If I get it fixed I will send it to you.Or post it here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|