Discuss Scratch

pixelperfect12
Scratcher
53 posts

How to make ice platforms?

So I've been working on a platformer for a while and most of the effect blocks are non-collidable. But since ice doesn't fall through things, I needed to make ice collidable, so I did so, along with the effect giver:
iftouchingcolor?thenset Frictionto1elseset Frictionto0.9
However the ice block still functions like an average platform. How do I make it so that ice is collidable and gives an ice effect?
Link to game: https://scratch.mit.edu/projects/713745050/
pixelperfect12
Scratcher
53 posts

How to make ice platforms?

bump (wanna get this over with by 2023)
mchen2010
Scratcher
39 posts

How to make ice platforms?

I check your code, and I cannot find where you multiplied (friction)*(VelocityX), so maybe that is causing a problem? It's prob. my fault, though. Tell me where to find it, and I'll debug from there. Thanks!
pixelperfect12
Scratcher
53 posts

How to make ice platforms?

mchen2010 wrote:

I check your code, and I cannot find where you multiplied (friction)*(VelocityX), so maybe that is causing a problem? It's prob. my fault, though. Tell me where to find it, and I'll debug from there. Thanks!
There's a big chunk of code that says:

whenIreceivegameloopforeversetVelocityXtoVelocityX*Friction. . .
You'll find it near the “move (steps)” definition.
pixelperfect12
Scratcher
53 posts

How to make ice platforms?

bump
pixelperfect12
Scratcher
53 posts

How to make ice platforms?

bump again, new deadline is tommorow
Thingied
Scratcher
1000+ posts

How to make ice platforms?

Move the “move” block all the way to the bottom like this:
pixelperfect12
Scratcher
53 posts

How to make ice platforms?

Thingied wrote:

Move the “move” block all the way to the bottom like this:
That doesn't seem to work, as when I stand on an ice platform friction is still 0.9.
Thingied
Scratcher
1000+ posts

How to make ice platforms?

pixelperfect12 wrote:

Thingied wrote:

Move the “move” block all the way to the bottom like this:
–snip–
That doesn't seem to work, as when I stand on an ice platform friction is still 0.9.
I forgot some stuff I did :\

Add a “set friction to 0.9” block to the top of the “move” custom block and set friction to 1 when touching ice during the collision check

pixelperfect12
Scratcher
53 posts

How to make ice platforms?

Thingied wrote:

pixelperfect12 wrote:

Thingied wrote:

Move the “move” block all the way to the bottom like this:
–snip–
That doesn't seem to work, as when I stand on an ice platform friction is still 0.9.
I forgot some stuff I did :\

Add a “set friction to 0.9” block to the top of the “move” custom block and set friction to 1 when touching ice during the collision check

Thanks, it worked! Topic closed.

Powered by DjangoBB