Move actor with touch and then at certain location do something

StormtrixStormtrix Member Posts: 256
edited November -1 in Working with GS (Mac)
Hey all,
been awhile since i've been on here but back to working on one of my projects,
basically a shapes game.. move the green square to the grey square location for a match.

I'm trying to just move an actor with touch and when I move that actor to a certain spot
on the screen then play a sound or something.

I've got the move on touch down with just -
Actor receives touch - constrain self.position.x to game.touches.touch 1.x
- constrain self.position.y to game.touches.touch 1.y

i was thinking if i then put a rule in like -
attribute - self.position.x = 400
attribute - self.position.y = 400
then -
play sound

thinking if i move the actor to position 400,400 on the screen that would work..
uh.. doesn't work. :)

also, if wouldn't mind adding if the actor is moved to that location then lock it there.

thanks,
storm
Sign In or Register to comment.