[Solved] Make a character only cling to certain walls?

Get help using Construct 2

Post » Tue Oct 27, 2015 2:45 am

I have a character that can cling to walls, and it basically functions well, but I want to have some control over what is considered a 'wall'. Because the character can cling nearly to the tops or bottoms of a solid (including sides of an object with 'Sine' behavior, e.g., a moving platform, which causes crazy sliding up and down) and still be considered 'Having a wall to left/right', I want to create a way to control the behavior. As it stands, there doesn't seem to be any way to put 'If sprite is colliding with [object]' as a condition in an event, so no matter what the wall is "made of", the game still treats the left and right sides of it like a wall.

Here are some examples of what I find...undesireable:

Image

I tried changing the size of the hidden collision box when the character was on the wall, but that caused problems when the character left the wall (such as getting stuck in ceilings because the height of the bounding box suddenly doubled).

I hope I'm making sense. I want to make it so the character can only cling when it's touching a certain object.
Last edited by Dualmask on Tue Oct 27, 2015 1:01 pm, edited 1 time in total.
B
10
S
2
Posts: 31
Reputation: 754

Post » Tue Oct 27, 2015 1:00 pm

Never mind, solved.

I turned on collisions for the player sprite and added a condition requiring that the sprite, not the collision box, is overlapping the specific wall object in order for the wall clinging variable to return true. Also added an event that stated that if the character was in the wall clinging animation and somehow ended up not overlapping the wall object, the character releases the wall and falls. It works perfectly.
B
10
S
2
Posts: 31
Reputation: 754


Return to How do I....?

Who is online

Users browsing this forum: David181 and 25 guests