In between two solids Character goes crazy

Get help using Construct 2

Post » Sun Mar 26, 2017 5:58 pm

Hey guys,

Presently I got a small problem.

Player 1 pushes a solid until it reaches a limit (collides with a wall)
Block and wall are same height therefore same collision height.

Player 2 goes on top of the block and wall/floor, but in between both it register a fall. So it keeps jumping a few pixels and falling.

I tried setting vectorY to 0 when overlapping both objects at the same time but nothing.

Anyone knows a simple solution? Thanks!!
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sun Mar 26, 2017 6:17 pm

I ran up against this issue awhile back...but mine was a bit different in that I didn't have 2 solids up against each other with that gap. An idea I tried, which hopefully works here too, is setting your standing animation to be set by an overlap at offset (or, inversely, your falling animation set to the inverse of the overlap at offset). Once I did that my issue was fixed. I hope it helps here too.

EDIT: I'd also put anything in the overlap check into a family (mine is simply called "solids")
B
60
S
36
G
23
Posts: 342
Reputation: 17,159

Post » Mon Mar 27, 2017 10:54 pm

Hey thanks! I tried that but with no luck. :(
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Mon Mar 27, 2017 11:22 pm

Strangely, if I copy and paste the solid, which is a n enlarged tile that I use solely for collision purposes, is not registering the same problem. In debug mode Y Pos is equal. But a solid create of same height registers a lower Y pos for player.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Tue Mar 28, 2017 12:59 am

It seems to be that when a Solid that can be pushed uses Platformer behaviour, when pushed towards another solid, it reacts weirdly. Even if after colliding with the other solid, I set Platform bevaviour to disabled in the pushed object, it still not working.

Anyone has suggestions? I can always try to bypass this in a longer way, but Im curious if anyone had similar issues in the past.
Thanks!
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Tue Mar 28, 2017 1:46 am

Are you turning off the push when the solid collides with the wall?

If not when the player is on top of the solid it is probably still pushing the solid.

I would probably need to see a simple capx to understand what you are doing?
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Tue Mar 28, 2017 2:11 am

I can send a capx but the game is two players one requiring a controller to execute the actions and its a bit advanced.

I tried turning off the Platform behaviour for the solid being pushed and in that case it works.
I tried putting the pushed solid object next to another of same height. If Platform behaviour is turned off, then it stays at same height. If the behaviour is on then it seems to move one pixel up and one pixel in the opposite direction of the nearby solid.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Tue Mar 28, 2017 2:18 am

FraktalZero wrote:I can send a capx but the game is two players one requiring a controller to execute the actions and its a bit advanced.

I tried turning off the Platform behaviour for the solid being pushed and in that case it works.
I tried putting the pushed solid object next to another of same height. If Platform behaviour is turned off, then it stays at same height. If the behaviour is on then it seems to move one pixel up and one pixel in the opposite direction of the nearby solid.


OK what is the action you want to happen because sounds like turning it off solves the problem?

I am having trouble visualizing what you are trying to accomplish without a capx sorry.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Tue Mar 28, 2017 2:44 am

Link to the capx file. Player 2 pushes the box by pressing right and x button on a xbox controller.
Player 1 is controlled using keyboard.

I need to be able to push some solids and also for them to be able to fall. I tried disabling Platform behaviour but that as well wasn't working.


https://drive.google.com/file/d/0B27TG57JCwl_UEpwY2VMeENSdE0/view?usp=sharing

The problem is something like that (sorry for the quality)
Image
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Tue Mar 28, 2017 3:15 am

OK, that didn't help because you are using plugins I don't use so I can't see the capx.

Here is a capx to try. I don't know if it is what you are looking for and it uses physics and a blank sprite to turn physics on.

https://www.dropbox.com/s/4nnqk7bzmtfc9k1/Push%20Block.capx?dl=0
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Next

Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 62 guests