Well, there isn't any built in "Stick To" block. So what you have to do is keep changing the sprite's position, but make it move the same amount as the sprite you want it to "stick" to.
The simplest case is if you want the center of your two sprites to be the same. Then you would use something like
[blocks]
<when green flag clicked>
<forever>
<if><( <{ Stick On }> <=> 1 )>
<go to[ Second Sprite
<else>
Some other motion commands, that you want it to do when not Stuck on
<end>
<end>
[/blocks]
The first sprite will go to the center of the second sprite until the variable Stick On is set to some value other than 1.
If you want the first sprite to go somewhere other than the center you might want to try something like this:
[blocks]
<when green flag clicked>
<forever>
<if><( <{ Stick On }> <=> 1 )>
<go to x (( X Position of Second Sprite <+> 25 )) )y
(( Y Position of Second Sprite <+> 124 ))
<else>
Some other motion commands, that you want it to do when not Stuck on
<end>
<end>
[/blocks]
Where "X Position of Second Sprite" is the new sensing block added in version 1.2 (no block here in the Forum, sorry). The offset values (25,124) I picked just to show you where they go, they would have to be changed for your application.
Note that if your Second Sprite is rotating too, life gets more complicated and you would have to use the Trig functions (Sin,Cos) to figure out where to relocate the sprite that is stuck on.
Offline