### Stop actor from sliding down when on 45 degrees angle tiles [SOLVED]

#### nikopol

• Posts: 26
Hey,

So the problem is pretty much explained in the title. How can I do this without increasing friction ? (since it would make it harder to walk up slopes)

« Last Edit: March 21, 2017, 07:46:56 am by nikopol »

• Posts: 2548
Set the friction to 0 when the player is pressing any key to move the actor.
Set the friction to 1 when the player is not pressing any key to move the actor.

<a href="http://static.stencyl.com/games/36296-0.swf" target="_blank" class="new_win">http://static.stencyl.com/games/36296-0.swf</a>

« Last Edit: March 20, 2017, 08:18:25 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

#### squeeb

• Posts: 1223
Genius.. haha.. I was trying to think that one out for a bit

#### nikopol

• Posts: 26
Awesome, solved my problem !

Didn't know we could interact with friction from outside the 'physics' tab

• Posts: 2548
Didn't know we could interact with friction from outside the 'physics' tab
Yes. And you can even set the friction to a value higher than 1
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

• Posts: 16
In addition to the title post, there is the rotating actor staying lined up with the tiles.
Could someone breakdown how to do that for me please?

• Posts: 2548
You can tag tiles with textual data that can be accessed during game.
Type in this field the angle toward which the actor must face when touching each tile:

Then, from a collision event, access this data by using this block:
And rotate the actor according to the value of such data.

« Last Edit: November 18, 2017, 10:09:46 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

• Posts: 16
You can tag tiles with textual data that can be accessed during game.
Type in this field the angle toward which the actor must face when touching each tile:

Then, from a collision event, access this data by using this block:
And rotate the actor according to the value of such data.

That is way beyond me, but I'll get to reading and see if I can figure it out. Thanks a bunch!

#### JeffreyDriver

• Posts: 1535
You can tag tiles with textual data that can be accessed during game.
Type in this field the angle toward which the actor must face when touching each tile:

Then, from a collision event, access this data by using this block:
And rotate the actor according to the value of such data.

That is way beyond me, but I'll get to reading and see if I can figure it out. Thanks a bunch!

This isn't as difficult as it first seems. You simply enter text to recall later. For instance, you can enter a description of the tile. E.g. water, slope, lava etc. and when your player collides just check the data: IF data of collided tile = water
Current Projects:
Retro Redux Compilation (NEW).
Retro Redux (untitled) (NEW).
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

• Posts: 16
So, I label my slopes (I only have 1 angle)
and then I tell my actor,
"if, data of collided tile" = "slope" > "rotate (some degrees)"
"otherwise" > "rotate 0"

? Is this what you're telling me?