JoMan
August 28, 2004, 10:26pm
1
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.
system
August 29, 2004, 12:22am
2
actaully i know exactly what ur problem is.
email me ur fla first.
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
system
August 29, 2004, 12:59pm
5
The email didnt get to you didnt get to you. Here, I made a smaller one so as to fit it on kirupa.
system
August 29, 2004, 3:43pm
6
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 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.!!
system
August 29, 2004, 3:49pm
7
hmmm im not sure wat to ddo though… where did u get the script… or did u write it urself?
system
August 29, 2004, 7:17pm
8
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 ).
system
August 29, 2004, 9:29pm
9
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
system
August 29, 2004, 10:33pm
10
Oh! I saw that one in an fla source. I tried that one. didnt work for me (it got really wierd).
system
August 29, 2004, 11:01pm
11
really…
hmm well theeres a few turtorials by leight… i prefer her old versions… better hittest.
system
August 29, 2004, 11:23pm
12
Tutorials, eh? Do you know where?
system
August 30, 2004, 4:52am
14
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
on the bottom left tehre is a list of stuff that include platform game open Fla’s/
check it out
system
August 30, 2004, 4:54am
15
system
August 30, 2004, 2:55pm
16
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:.
system
August 30, 2004, 10:34pm
17
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.
system
August 31, 2004, 2:25am
18
Hmmm, I didnt know you could do that with a hitTest.