How to make the actor ˜draggable˜ in only certain areas

decaoeudecaoeu PRO Posts: 61
edited July 2012 in Working with GS (Mac)
Hello again guys, i just learned in this tutorial how to Drag and Drop on Gamesalad, the problem is i only need the actors to be drag and drop, in the top of the screen, how could a do that?

Answers

  • patapplepatapple Member Posts: 873
    create an invisible actor where you want that that the actor can be dragged. in the actor that the player drag create a rule when overlaps or collides with the other actor and now you can put your rules to drag.

    i hope it works because i don't try it :)
  • decaoeudecaoeu PRO Posts: 61
    I created a rule that says, only to move if the self.position.y < 500, the problem now is, that when the actor hits the <500 the ball gets stucked. I dont think this is the right way to do it.
  • decaoeudecaoeu PRO Posts: 61
    Thank you very much, this was exactly what i need!
  • thelogobarthelogobar Member Posts: 93
    I'm after something similar. I want the actor only to be draggable in certain areas of the screen. Like if it was being flicked from area to area, but you can't interact with the actor when it's not in a flickable area.

    It works ok but if the player keeps a finger on the screen and drags it to the next flickable area the actor shoots to that location.

    Right now I have a timer that deactivates the touch rule, but it would be nice if I could turn it off when the actor leaves the flickable area and the player has to start the touch again.
  • moop62moop62 Member Posts: 5
    edited September 2012
    If anyone is using this, I found a cool thing to do is change the rule

    -if self.positiony < 250
    to
    -if mouse.positiony < 250

    this allows the block to still be dragged even if the mouse goes slightly over the 250 mark, instead of having to reclick on the box

    also thanks @uptimistik
Sign In or Register to comment.