Make an object stick to another object.

Hello there GameSaladers, I was wondering if there is a way to make an actor fly on to another and stick to it on impact. Kinda like a stickbomb hitting a car and being stuck onto it as it moves about.
Comments
search the creator templates theres one there,
Ill try and make one if you can't find it..
just email me at thermoapps@gmail.com
---------------------------------
Posted by LeonardDeveloper, contact me on thermoapps@thermo-apps.com
Be sure to visit my WEBSITE
Have a look at my GS Tutorials
----------------------------------------------------
Yours Sincerely,
Jack Leonard
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Rule
When actor receives event overlaps or collides with (your other actor),
constrain attribute : self x [to] other actor's position x + (other actor's position x - self x)
constrain attribute : self y [to] other actor's position y + (other actor's position y - self y)
To do this you need to create two real game attributes for your main character, setting them to the x and y positions accordingly.
Not sure if it works, but it's worth a shot!
It doesn't work very well..... thats what i had originally thought....
Make a rule when actor collides with whatever you want it to stick to:
change self motion linear velocity x to 0
change self motion linear velocity y to 0
change stickX to self position x
change stickY to self position y
constrain self position x to stick x
constrain self position y to stick y
cheers
I was thinking.
Set up a Contraint function.
Boolean called stick.
When overlaps or collides with actor change att Stick to true.
If struck is true "Constrain"