Here is a very primitive example, works with rectangular shapes with Origin point set to (0,0) :
SmallSprite Compare X if less than BigSprite.x -> SmallSprite Set x to BigSprite.x
Compare two values -> SmallSprite.BBoxRight>BigSprite.BBoxRight -> SmallSprite Set x to (BigSprite.BBoxRight-SmallSprite.width)[/code:2snzegm8]
(similar code for Y coordinate)
If your sprites have complex shapes, there are several things you can do.
If partial overlapping is ok, you can save SmallSprite position in instance variables oldX and oldY on every tick. If on next tick the sprite moves and no longer overlaps the BigSprite, return its position to oldX, oldY.
Or you can pin a few very small invisible sprites to the corners of the SmallSprite, lets call them detectors. If any of the detectors is not overlapping the BigSprite, return SmallSprite to its previous position.
Or you can use the same principle with image points and "Pick overlapping point" event.