How to have an actor snap to multiple actors or x/y positions?

CulturePlayCulturePlay Member, PRO Posts: 113
edited May 2012 in Working with GS (Mac)
I've been racking my brain and I can't seem to figure out the logic to this complex drag and drop problem I've been designing. Let's say I have N draggable items that start at a particular x/y location on the scene. Each of the draggable items can snap into any N targets on the scene if they are within let's say within 50pixels, otherwise snapback to original position.

Any suggestions on how to solve this? I've studied all the videos on drag and drop...but all focus on drag 1 actor to 1 specific target. In my case each actor needs to be able to snap to multiple targets and otherwise snap back to starting position.

Thanks!

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2012
    Have you seen the snap to grid demo in the GameSalad-->New area? It has examples of dragging a single actor to one of many possible grid locations. It doesn't include snap back, though. The Basic Select and Drop Grid Demo is also really good. Just type "grid" into the search field.
  • CulturePlayCulturePlay Member, PRO Posts: 113
    Thanks @tshirtbooth you are the man!

    @tatiang yes the snap to grid didn't work for me.

    Thanks guys! I really appreciated it.
  • creativeappscreativeapps Member Posts: 1,770
    @tatiang I searched for Snap To Grid in new area. Result display 0. Is it still available?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @creativeapps Yes, just type in "grid" as I mentioned and you'll find it.
Sign In or Register to comment.