Pin behaviour DRAG

Get help using Construct 2

Post » Thu Dec 10, 2015 11:29 pm

I have a problem where if my character moves then the pinned top half of the body (seperate pinned images following the mouse) seems to drag behind, Like it can't keep up.
The botom half of the character from pelvis down is a spriter animation.

IMAGE of character falling to the right:
https://www.dropbox.com/s/9uwfzdxbhy5xqzx/Untitled-1.jpg?dl=0
Ive tried using the every tick command but that does the same

CAPX:
https://www.dropbox.com/s/1uh1isbe45syity/dummy%20deathmatch.capx?dl=0

if anybody can help me out it would be much appreciated :)
B
7
S
2
Posts: 51
Reputation: 1,210

Post » Sun Dec 13, 2015 2:07 am

.
B
7
S
2
Posts: 51
Reputation: 1,210

Post » Sun Dec 13, 2015 5:14 am

I don't have access to C2 atm but the reason a pinned object is lagging behind the object it's pinned to is a order issue. Generally you don't have much control over it. You could try to change the order of the behaviors in the object. As I recall the pin behavior is run after the other behaviors so rearranging may not do anything.

Anyways my solution of choice would be to position objects with events instead of using the pin behavior. This gives you full control of what happens. There are a few ways to do this. This simplest is to add imagepoints on the parent object that you'd position the child objects to. Another is to store the X,y or angle,distance offsets from the parent object.
B
85
S
27
G
85
Posts: 5,067
Reputation: 57,868

Post » Mon Dec 14, 2015 1:48 pm

Thankyou for the reply :), and do you mean every tick set object to image point one? just an example? if so i tried that and i still get drag :(.
B
7
S
2
Posts: 51
Reputation: 1,210

Post » Mon Dec 14, 2015 1:59 pm

If your every tick event is the last event in your event sheet, it should work..
If it doesn't the behaviour moving the rest of your sprite is performed after all events..
The only way I can think of than is changing that movement to events too..
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


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], KailSaisei, Magistross and 11 guests