# Platform problems

**URL:** <https://forum.kirupa.com/t/platform-problems/256722>\
**Category:** Uncategorized\
**Created:** [April 6, 2008, 3:23pm UTC](https://forum.kirupa.com/t/platform-problems/256722 "2008-04-06T15:23:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orbitals](https://avatars.discourse-cdn.com/v4/letter/o/ac91a4/32.png) [@Orbitals](https://forum.kirupa.com/u/Orbitals)\
**Post date:** [April 6, 2008, 3:23pm UTC](https://forum.kirupa.com/t/platform-problems/256722/1 "2008-04-06T15:23:41Z")

</div>

(Total noob here.) I’m not sure if this would be better off in the games forum, but here goes.

I’m following a tutorial to make a platform game, and it all works perfectly except for one thing. If the hero is standing under a platform way above him (supposedly too high to jump up to), when he jumps he zooms right up there.

```auto

onClipEvent (enterFrame) {
if (falling == true) {
velocity += gravity;
_y += velocity;
}
for (i=0; i<99; i++) {
if (this.hitTest("_root.platform" +i)) {
platform = eval("_root.platform" +i);
}
}
if (this.hitTest(platform)) {
if (falling == true) {
_y = platform._y;
velocity = 0;
falling = false;
}
} else {
falling = true;
}

```

I’m completely befuddled. Does anyone know a way to prevent the hero from doing this?
