I want to know how to make a solid object that you cannot jump through and still have a gravity function
Offline
concentrating wrote:
I want to know how to make a solid object that you cannot jump through and still have a gravity function
Well...since you haven't given a lot of specifics...the most important thing you'll need is this block:
<touching [Sprite1 v]?>
Offline
Do you basically want a platformer-physics script (if so, be more specific about what you want, like wall jumping, acceleration along the x axis, etc.) or do you already have that working and you want a wall that can be affected by gravity?
Offline
I want to have multiple levels so i need the platforms to be in the backround.
Offline
I almost forgot. I have already tried using When Gf clicked forever if/else if- touching color change y by 1 else- change y by -1. It works with the gravity but platforms will take you through them,
Offline
when gf clicked set [y v] to (0) forever change [y v] by (-0.1) change y by (y) if<touching color []?> set [y v] to ((-0.5)*(y)) change y by (y) if<touching color []?> change y by (y) end if<<key [up arrow v] pressed?> and <(y) > (0)>> set [y v] to (5) end end if<key [right arrow v] pressed?> change x by (3) if<touching color []?> change x by (-3) end end if<key [left arrow v] pressed?> change x by (-3) if<touching color []?> change x by (3) end end
Offline
What does this script do I tried it and nothing happened
Offline
It should be a platformer script
Did you set the
<touching color[]?>to the color of your walls?
Last edited by MoreGamesNow (2012-07-15 15:21:14)
Offline
I tried it again and it works for walking smoothly but it does have a glitch but I fixed it
Offline
I have figured out a good solid platform script but now I want to have wall jumping and acceleration along the x axis. Could you please show me a good script for this. Thank you.
Offline
wdfgbw46h wrote:
how can i make a solid platform really quickly please help me
Solid platform... Well:
when gf clicked forever if < <touching color? [#000000]> and < not < key [space v] pressed?> > > set [yvel v] to [0] end endHope that helps,
Last edited by CAA14 (2013-03-19 15:16:59)
Offline
when gf clicked set [y v] to (0) forever change [y v] by (-0.1) change y by (y) if<touching color []?> set [y v] to ((y)/(-2)) change y by (y) if<touching color []?> change y by (y) end if<<key [up arrow v] pressed?> and <(y) > (0)>> set [y v] to (5) end end if<key [right arrow v] pressed?> change [xvel v] by (0.5) end if<key [left arrow v] pressed?> change [xvel v] by (-0.5) end set [xvel v] to ((xvel)*(0.9)) change x by (xvel) if<touching color []?> set [xvel v] to ((xvel)/(-2)) change x by (xvel) if<touching color[]?> change x by (xvel) end if<<key [up arrow v] pressed?> and <(y) < (0)>> set [y v] to (4) if<(xvel) > (0)> set [xvel v] to (3) else set [xvel v] to (-3) end endThat should do it
Last edited by MoreGamesNow (2013-03-19 16:53:37)
Offline
MoreGamesNow wrote:
when gf clicked set [y v] to (0) forever change [y v] by (-0.1) change y by (y) if<touching color []?> set [y v] to ((y)/(-2)) change y by (y) if<touching color []?> change y by (y) end if<<key [up arrow v] pressed?> and <(y) > (0)>> set [y v] to (5) end end if<key [right arrow v] pressed?> change [xvel v] by (0.5) end if<key [left arrow v] pressed?> change [xvel v] by (-0.5) end set [xvel v] to ((xvel)*(0.9)) change x by (xvel) if<touching color []?> set [xvel v] to ((xvel)/(-2)) change x by (xvel) if<touching color[]?> change x by (xvel) end endOne sec, adding wall jumping.
Hey, i have a question... Why is the yvel always going down? Wouldn't that make it fall through the platforms?
Regards,
CAA14
Offline