Discuss Scratch

bmhsassy
Scratcher
11 posts

Making a Platform Game

I'm trying to make a platform game where my little character: a piece of candy, completes levels and stuff. It can move left and right perfectly, but making a realistic jumping script that makes the character jump up and then cascade down is really hard for me. Platform tutorial scripts aren't working, and I've tried a few. Does anyone have any ideas?
FrankieJrJr
Scratcher
100+ posts

Making a Platform Game

whenclickedforeverifkeyup arrowpressed?thensetgravityto7changeybygravityrepeatuntiltouchingground?changegravityby-0.5changeybygravity
FrankieJrJr
Scratcher
100+ posts

Making a Platform Game

repeatuntiltouchingground?changegravityby-0.5changeybygravitysetgravityto0

this isn't perfect but
Scratchy_the_Caty
Scratcher
36 posts

Making a Platform Game

@FrankieJrJr gives a good method. There are also some platform engines (I am using the one by @crazyhenryj , and it is working well for me) that have a script that apply jumping, left/right motion, gravity, etc.. Those should be able to stimulate jumping for you.

However, if you want to be the writer of the script, I'd say use @FrankieJrJr ‘s as a model. That is probably what you’d find in most platform games, and it works really well.
Creeper_V2_0
Scratcher
13 posts

Making a Platform Game

That's really cool! But is there a way to do the same effect if walking off the edge of a platform?
hm104846
Scratcher
2 posts

Making a Platform Game

all very helpful!!!

Powered by DjangoBB