Problems with pinned behavior

Get help using Construct 2

Post » Sat Jun 02, 2012 5:33 pm

I have a family of sprite objects (rectangular containers) that I want my character sprite to have the option of attaching to when the 2 are in close proximity to each other and releasing at will. While attached, I want the character sprite to move forwards and backwards with the 'containers'.

When I add the pinned behavior, it helps, but there are a couple of problems:

1) when I press space to pin my character sprite to the "container" sprite, the 2 sprites seem to stay in one area and just ever so slightly drift in the direction that I press because I need the solid behavior on the 'containers' to make sure that the player can't walk through them, they don't go through walls, etc. The transition is smooth without solid behavior, but how do I keep the smooth transition to pinned without loosing the solid attributes?

2)Another problem is that once my player is pinned to the 'container', the movement should be only forwards and backwards, but always facing the same direction (example: if the 'container' sprite is pinned on the southern side of player, the player stays facing South while only being allowed to move North and South until unpinned). With the 8 directional movement applied while the sprites are pinned, it doesn't work. Does anybody shed some light on how I can mend this?

Sorry, this might be easy stuff, but I'm so fresh at this. Any help would be great, thanks.
B
4
Posts: 18
Reputation: 811

Post » Sat Jun 02, 2012 5:42 pm

Posting your capx would help us helping you.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sun Jun 03, 2012 3:22 am

Ok. Cool, I didn't have a dropbox account. here it is:

https://www.dropbox.com/s/xhctfrcfah5snw9/ThePusher.capx

Thanks
B
4
Posts: 18
Reputation: 811

Post » Sun Jun 03, 2012 3:24 am

B
4
Posts: 18
Reputation: 811

Post » Mon Jun 04, 2012 1:19 am

Can anyone shed any light on this? Any info would be much appreciated, thanks.
B
4
Posts: 18
Reputation: 811

Post » Mon Jun 04, 2012 2:19 am

I made some changes to your .capx, mainly using instance booleans and some extra sprite objects, hope you find it helpful. The containers don't collide while you're pulling them now, but you can probably figure that out yourself.

Link: ThePusher_Edited.capx (r92)

B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Tue Jun 05, 2012 3:41 am

Thanks for all of that Nimtrix
B
4
Posts: 18
Reputation: 811


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests