# Whats wrong with mario?

**URL:** <https://forum.kirupa.com/t/whats-wrong-with-mario/62533>\
**Category:** programming\
**Created:** [August 28, 2004, 10:26pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533 "2004-08-28T22:26:03Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoMan](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@JoMan](https://forum.kirupa.com/u/JoMan)\
**Post date:** [August 28, 2004, 10:26pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/1 "2004-08-28T22:26:03Z")

</div>

I am having trouble with my characters (marios) ground landing. If mario jumps on to a higher platform, he goes into the ground. And if mario jumps down onto the ground, he will either land above the ground, or in it. I would be very grateful if someone could help me out. Thanks in advance.

peace

P.S. I will need your email so that I can send the fla to you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 12:22am UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/2 "2004-08-29T00:22:39Z")

</div>

actaully i know exactly what ur problem is.

email me ur fla first.

[pathideout@hotmail.com](mailto:pathideout@hotmail.com)

ur problem i am assuming is that u put mario probably in the middle of the little cartecian plain ( x/y axis)

u have to mario above it, over the x axis.

just send it to me and i’ll fix u up if i can

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 1:25am UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/3 "2004-08-29T01:25:42Z")

</div>

Ok, I sent it :).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 12:20pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/4 "2004-08-29T12:20:50Z")

</div>

i havnt got it yet

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 12:59pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/5 "2004-08-29T12:59:52Z")

</div>

The email didnt get to you didnt get to you. Here, I made a smaller one so as to fit it on kirupa.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 3:43pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/6 "2004-08-29T15:43:42Z")

</div>

hmmm… iim seeing it and i think u may have to make sperate hittests…

im not sure… ill try doing it myself…

ps: ur doing a mario game 2… me 2!!!

> **[Yahoo Small Business - Cheap Domains, Web Hosting, Website Builder, Ecommerce...](https://smallbusiness.yahoo.com/)**
>
> Yahoo Small Business Offers Cheap Domain Names, Web Hosting, Easy Website Builder, Business Email, Local Listings, and Ecommerce Solutions for Your Small Business.

its in early stages but i working on it.!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 3:49pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/7 "2004-08-29T15:49:40Z")

</div>

hmmm im not sure wat to ddo though… where did u get the script… or did u write it urself?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 7:17pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/8 "2004-08-29T19:17:03Z")

</div>

Well, the jumping and ground hitTest was actually ment to help someone else, but I also found it and taught it to myself. By the way, nice game ;). You used the “Super Mario All Stars” mario 😃 (ahhhh… Nastalga!). Do you think you could teach me a good hitTest? ( I _Badly_ need one ).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 9:29pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/9 "2004-08-29T21:29:40Z")

</div>

> [@joMan](#):
>
> Well, the jumping and ground hitTest was actually ment to help someone else, but I also found it and taught it to myself. By the way, nice game ;). You used the “Super Mario All Stars” mario 😃 (ahhhh… Nastalga!). Do you think you could teach me a good hitTest? ( I _Badly_ need one ).

lol… i’ll see wat i can do…

i made my own but it isnt as good as this one… mines basic and i dun really like it…

// hero hitTest  
function sideTopHitTest() {  
for (i=0; i\<1; i++) {  
// Hero Side hitTests  
// Left  
if (ps.hitTest(h.\_x+x+hb.xmin, h.\_y+y+(hb.ymin), true) || ps.hitTest(h.\_x+x+hb.xmin, h.\_y+y-10, true) || ps.hitTest(h.\_x+x+hb.xmin, h.\_y+y-20, true) || ps.hitTest(h.\_x+x+hb.xmin, h.\_y+y-30, true) || ps.hitTest(h.\_x+x+hb.xmin, h.\_y+y+(hb.ymax-buffer), true)) {  
h.\_x += xSpeed;  
}  
// Right  
if (ps.hitTest(h.\_x+x+hb.xmax, h.\_y+y+(hb.ymin), true) || ps.hitTest(h.\_x+x+hb.xmax, h.\_y+y-10, true) || ps.hitTest(h.\_x+x+hb.xmax, h.\_y+y-20, true) || ps.hitTest(h.\_x+x+hb.xmax, h.\_y+y-30, true) || ps.hitTest(h.\_x+x+hb.xmax, h.\_y+y+(hb.ymax-buffer), true)) {  
h.\_x -= xSpeed;  
}  
// Hero Top hitTest  
if (ps.hitTest(h.\_x+x+(hb.xmin+1), h.\_y+y+(hb.ymin-2), true) || ps.hitTest(h.\_x+x+(hb.xmax-1), h.\_y+y+(hb.ymin-2), true)) {  
velY = 4;  
xSpeed = -.2;  
}  
// Boundaries  
if (h.\_x-(h.\_width/2) \<= 0) {  
h.\_x = h.\_width/2;  
} else if (h.\_x+(h.\_width/2) \>= 450) {  
h.\_x = 450-(h.\_width/2);  
}  
}  
}

best hittest… from leights turtorial…

best one ive found i think

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 10:33pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/10 "2004-08-29T22:33:50Z")

</div>

Oh! I saw that one in an fla source. I tried that one. didnt work for me (it got really wierd).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 11:01pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/11 "2004-08-29T23:01:45Z")

</div>

really…

hmm well theeres a few turtorials by leight… i prefer her old versions… better hittest.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2004, 11:23pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/12 "2004-08-29T23:23:03Z")

</div>

> [@patricktheking](#):
>
> really…
> 
> hmm well theeres a few turtorials by leight… i prefer her old versions… better hittest.

Tutorials, eh? Do you know where?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 4:51am UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/13 "2004-08-30T04:51:46Z")

</div>

[http://www.actionscripts.org/showMovie.php?id=514](http://www.actionscripts.org/showMovie.php?id=514)

[http://www.flashkit.com/board/showt...threadid=130126](http://www.flashkit.com/board/showt...threadid=130126)

[http://www.flashkit.com/board/showt...atform+tutorial](http://www.flashkit.com/board/showt...atform+tutorial)  
[http://www.flashkit.com/tutorials/G](http://www.flashkit.com/tutorials/G)…-1052/index.php  
[http://www.freewebs.com/savco/site.htm](http://www.freewebs.com/savco/site.htm)  
[http://www.edmack.com/flash/](http://www.edmack.com/flash/)  
[http://www.edmack.com/flash\_tutorials/](http://www.edmack.com/flash_tutorials/)  
[http://www.hot.ee/tonypa/flash/flas/](http://www.hot.ee/tonypa/flash/flas/)  
[http://www.the-stickman.com/tutoria...ellaneous.shtml](http://www.the-stickman.com/tutoria...ellaneous.shtml)  
[http://www.flashkit.com/board/showt...atform+tutorial](http://www.flashkit.com/board/showt...atform+tutorial)  
[http://www22.brinkster.com/hamzaf/experiments.html](http://www22.brinkster.com/hamzaf/experiments.html)  
[http://www.geocities.com/thefastfiles/](http://www.geocities.com/thefastfiles/)

hitTest -

[http://www.flashkit.com/board/showt...20&pagenumber=1](http://www.flashkit.com/board/showt...20&pagenumber=1)

AI - [http://www.kirupaforum.com/forums/s](http://www.kirupaforum.com/forums/s)…&threadid=16649

skribble or someone posted it a while back and i saved it as i figured i would once need it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 4:52am UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/14 "2004-08-30T04:52:40Z")

</div>

i dun know if they all work… but im sure some are bound 2…

O as well goto

[http://www.gotoandplay.it/\_articles/2003/12/scrolling\_upd.php](http://www.gotoandplay.it/_articles/2003/12/scrolling_upd.php)

on the bottom left tehre is a list of stuff that include platform game open Fla’s/  
check it out

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 4:54am UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/15 "2004-08-30T04:54:41Z")

</div>

[http://www.gotoandplay.it/\_articles/2003/12/scrolling\_upd.php](http://www.gotoandplay.it/_articles/2003/12/scrolling_upd.php)

sorry it got cut off.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 2:55pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/16 "2004-08-30T14:55:04Z")

</div>

Thank you for the tutorials and your help, patricktheking :beam:! You will be credited in my game’s credits :).

> [@patricktheking](#):
>
> sorry it got cut off.

Thats alright :thumb:.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2004, 10:34pm UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/17 "2004-08-30T22:34:21Z")

</div>

the easiest thing to do is:  
when mario hits the ground, set mario’s \_y property to equal that of the ground. you may need to subtract \_height from the \_y property of the ground - it all depends on the registration points.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2004, 2:25am UTC](https://forum.kirupa.com/t/whats-wrong-with-mario/62533/18 "2004-08-31T02:25:17Z")

</div>

Hmmm, I didnt know you could do that with a hitTest.
