Sir isaac's theory bugs meh!
HEY GUYS! what's up?
i've been doing some here and there with gravity
and this is the thing that bugs me...
i cant get the guy to land PERFECTLY on a platform
yes it lands and stops but it changes position
(like it lands on top of the platform, then in the middle)
how to fix this?
ahm, here's the script i used:
code:
if (Key.isDown(Key.SPACE) && !jumping) {
vel_y = 40;
jumping = true;
}
if (jumping == true) {
vel_y -= 6;
if (vel_y <=-40) {
vel_y = -40;
}
this._y -= vel_y;
}
if (this.hitTest(_root.ground)) {
vel_y = 0;
jumping = false;
}
if (this.hitTest(_root.ground) && !jumping) {
fall += 1;
if (fall>40) {
fall = 40;
}
this._y += fall;
}
the ground there is the instance name of my platform
yeah, can anyone help me out with this,
THNX a BUNCH!
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
This is probably a silly question but have you checked the registration points of your mc's?
erhm, pardon me for my poor flash language
but, Movie clip entry points?
whats that?
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
double click the mc that you want to edit. and then move the mc so that the crosshair is at the point where you want to calculate your positions from. typically this would be the top of the platform mc and the bottom of the "player"'s feet. on this file there are 2 mc's on the stage.
symbol 1 - reg point on bottom.
symbol 2 - reg point on top.
Attached Files
I just tried it on my file
and yeah, i see what you mean
though just to get things off my chest,
i have this file(credited from another person, its not mine!)
and its like my basis for gravity
but the problem is that it sometimes sticks to the upper platforms
and it doesnt land ON them
can it be fixed?
anyhoo, thnx a bunch!
Attached Files
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
hi, just had a quick look and i'm sure somthing can be done, i'll have a look sometime in the next day or so, sorry, but i've got lots on. I presume your problem is that the hero mc doesn't sit neatly on top of the platforms.
ah no rush, hehe
anyway, yeah, thats my problem...
anyway thnx for the help!
"Are those gummy worms? Can I have some?"
"Nevermind, I just saw one move by itself..."
Attached Files
Charity begins at home.
But it doesn't end there!
ooh sorry wrong file thats someone else's.
z x move
space jump
Attached Files
Charity begins at home.
But it doesn't end there!
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