How to pin a box to player?

Get help using Construct 2

Post » Thu Aug 15, 2013 3:32 pm

Hey,
i have a problem to pin a solid sprite to player. What's going wrong? Can anyone hel me? Thanks.

Here is the *.capx:
https://www.dropbox.com/s/258a110rhfspi9t/PinABox.capx

Best regards,
wossi
B
7
S
2
Posts: 84
Reputation: 754

Post » Thu Aug 15, 2013 3:47 pm

@wossi
You need to teleport the box first.
Two separate actions :
Box > Move To Object Location (Player)
Box > Pin To (Player)
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Thu Aug 15, 2013 3:56 pm

Hey, thanks for your answer but this is not what I want. I'm looking like this: http://www.newgrounds.com/portal/view/604592wossi2013-08-15 15:56:15
B
7
S
2
Posts: 84
Reputation: 754

Post » Thu Aug 15, 2013 3:58 pm

@wossi
Player > If colliding with Box > Pin Box to Player
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Thu Aug 15, 2013 4:19 pm

Hey, thanks for your post - I have a solution. Look at this *.capx file:
https://www.dropbox.com/s/0958dq7ocqxd0r6/PinABox_Fixed.capx

I want these a little bit faster. But the problem is, when it's too fast, than I loose the box :(
How can I fix that? wossi2013-08-15 16:21:24
B
7
S
2
Posts: 84
Reputation: 754

Post » Thu Aug 15, 2013 4:44 pm

@wossi

You want what to be faster, push/pull?
What do you mean by 'lose the box'?
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Thu Aug 15, 2013 4:53 pm

Ok, so I would like the following:
If the player is to the right or to the left or on the box and press the spacebar, then the box will depend on the player. The box is then exactly follow the player's movements. Without delay. Only when the player again pressing the space bar, the box is no longer the player.

Sorry for my bad english.
B
7
S
2
Posts: 84
Reputation: 754

Post » Thu Aug 15, 2013 4:57 pm

@wossi

Create a function 'When the Player object collides with the Box object, pin the Box to the Player.' The Box will then follow the Player's movement, jumping etc as if attached.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Thu Aug 15, 2013 5:11 pm

Ok, I have the function "is on collision" > "pin it to object" - here is the *.capx: https://www.dropbox.com/s/521hi5sl64dux3l/PinABoxPhysics.capx (now with physics)
The box is now pinned to player, but I have no idea how I can control these with the spacebar like: "press spacebar" > "pin to object" and "press spacebar again" > "unpin"wossi2013-08-15 17:12:26
B
7
S
2
Posts: 84
Reputation: 754

Post » Thu Aug 15, 2013 5:20 pm

Not having a great day.. LittleStain2013-08-15 17:29:36
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests