constrain dragging area?

happyhathappyhat Member Posts: 49
edited May 2012 in Working with GS (Mac)
Hi - I have an actor that needs to be able to be dragged into a box (it's not as bad as it sounds!!) - is there a simple way to do this? I tried setting boundaries but this didn't really work. Thanks

Answers

  • simo103simo103 Member, PRO Posts: 1,331
    edited May 2012
    @happyhat ... I'm guessing you are constraining the actor to your touch to drag it around and I believe that can override some collisions.

    If that is the case I would suggest trying a rule in your drag actor, when it overlaps or collides with the box and leave the main part of the rule empty (or put your collide with box behaviour in there with a timer after 0.1 secs or something to allow the drag actor to get in), open the Otherwise and put your constrain to touch rules in there. This should release the constrain behaviours when it touches the box. At least in theory :D
  • happyhathappyhat Member Posts: 49
    Hi many thanks -I'm still a newbie - could you tell me what to put in the boxes to constrain to touch?
  • simo103simo103 Member, PRO Posts: 1,331
    @happyhat ... tshirtbooth has a tremendous website with videos and free templates on almost everything you can do with GS. Here is the link to one that will allow you to download a constrain to touch template and it has some collide info as well. Note: constrain to mouse is the same as constrain to touch. http://gshelper.com/constrain-to-mouse-and-keep-collision-gamesalad/
  • happyhathappyhat Member Posts: 49
    Ok many thanks - will have a look
  • happyhathappyhat Member Posts: 49
    that nearly worked - only problem is I have more than one object and when I created more they all got stuck to each other...maybe there is another template out there which can take multiple actors....so they need to be able to drag but be confined by boundaries (i.e. don't want actors being dragged off screen) ??
  • simo103simo103 Member, PRO Posts: 1,331
    this one helps with picking one actor at a time:http://gshelper.com/how-to-select-overlapping-actors-in-gamesalad/
  • happyhathappyhat Member Posts: 49
    thanks - I actually used this tutorial to make the actors...just need to constrain now (think by adding the constrain to mouse as well is my problem..
Sign In or Register to comment.