Page 1 of 1

Pin on an object same angle distance

PostPosted: Mon Sep 03, 2012 9:04 pm
by kantin
Hi everybody
I have a little problem but impossible to resolve ....



I want to pin on an object and that it remains at the same distance
I'm getting there but I get the first image with:
"Set position P1 and Set angle to P1
I would get the second image then I do a "Move fordward 10" but I get the image 3

If you have a idea
Thank you

Re: Pin on an object same angle distance

PostPosted: Mon Sep 03, 2012 9:17 pm
by sqiddster
instead of using 'move forward 10', use 'set y to self.Y - 10'

Re: Pin on an object same angle distance

PostPosted: Mon Sep 03, 2012 11:03 pm
by kantin
Thank you
but when I use "movement car" the "shield : red bar" does not remain at the same distance.
it brings when I turn

Re: Pin on an object same angle distance

PostPosted: Tue Sep 04, 2012 10:38 am
by kantin
With Capx For help
https://dl.dropbox.com/u/102685504/testshild2.capx
Thank youkantin2012-09-04 10:39:47

Re: Pin on an object same angle distance

PostPosted: Thu Sep 06, 2012 12:57 pm
by kantin
Hello Really blocked Please help thank you

Re: Pin on an object same angle distance

PostPosted: Thu Sep 06, 2012 1:23 pm
by Kyatric
Example capx (using the regular car movement)

How to pin ? just use the pin behavior, set the object where you want the instance, and use the action "pin to object" using position & angle.

Re: Pin on an object same angle distance

PostPosted: Thu Sep 06, 2012 3:15 pm
by kantin
Hi thank you but
Yes, but the problem is the same I want with the space bar, the shield advance 10px forward.
With Pin is imposible or am I wrong...!

Re: Pin on an object same angle distance

PostPosted: Thu Sep 06, 2012 5:39 pm
by TELLES0808
unpin, move, pin again.

If you have difficult on knowing what car is pinned with what shield, use instances variables.

You can learn about them here: http://www.scirra.com/tutorials/361/understanding-uid-iid-health-of-enemies-and-rocket-smoke-trailTELLES08082012-09-06 17:40:39

Re: Pin on an object same angle distance

PostPosted: Sat Sep 08, 2012 7:35 am
by kantin
Thank you very Much for you help