How do you make a sprite unpin and move forward?

Get help using Construct 2

Post » Mon Jan 11, 2016 9:32 am

I want my sprite to be able to pin to a object and be able to jump off it, move forward from it or something similiar. The problem is when teh sprite unpins, it just falls off straigth down always. I have tried making it set platform vector y or platform vector x when it unpins but it still just falls straigth down.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Mon Jan 11, 2016 12:12 pm

I want my player sprite to be able to be pinned to a another sprite and jump off the sprite whit the platform behavior. I tried making this event:
Event: Player sprite is pinned
Sub Event: On up arrow pressed
Action: Unpin
Action: Set platform vector y to -950
Action: Set platform vector x to -950
The problem is that when i unpin from the sprite the player sprite does not jump off and just falls straigth down. Is there any way to solve this?
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Mon Jan 11, 2016 12:23 pm

Maybe add a slight delay? Like a subsecond, so the vector velocity doesn't activate it while pinned.
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Mon Jan 11, 2016 1:18 pm

Set the other object as platform as well. It will move with the player. Also you can try the pin/anchor options. They have worked for me on the game I have released.

Alternatively, send us your Construct 2 file and we ( the community [some of us actually care] ) can help you further.
B
14
S
1
Posts: 65
Reputation: 732

Post » Mon Jan 11, 2016 1:26 pm

Whenever I have a problem with the pin behavior I instead tell the object to position to another objects position every tick with the set position and:
[object].ImagePointX("[imagepoint")
[object].ImagePointY("[imagepoint")
B
12
S
4
G
1
Posts: 137
Reputation: 1,519

Post » Thu Jan 14, 2016 4:32 am

mapmerry wrote:Whenever I have a problem with the pin behavior I instead tell the object to position to another objects position every tick with the set position and:
[object].ImagePointX("[imagepoint")
[object].ImagePointY("[imagepoint")




Best answer. My player sprite can now set it's position to another sprite and jump off it.
B
11
S
2
Posts: 262
Reputation: 1,309


Return to How do I....?

Who is online

Users browsing this forum: AllanR, Artpunk, QuantumMMX and 8 guests