I need help with this logic problem - Video included
I'm having problem with what should be quite simple logic but can't for the life of me work it out. I have 5 actors named "head 1 to head 5" and they are constrained to an invisible actor and 2 buttons which when pressed move the actors left or right. The issue I'm having is I can click the button and it moves in sequence from 1 to 5 but can't make it move between the individual actors.
http://www.youtube.com/watch?v=nlLFoseRkNA
The rules I set up are as follows inside the the Left button Actor
When touch pressed
change attribute game.SwapHeadLeft to game.SwapHeadleft + 1
attribute game.SwapHeadLeft > 4
change attribute game.SwapHeadLeft to 4.
and the same for the right button actor
Now Inside the Invisible holder I set up the following
Move Left
When game.SwapHeadLeft = 1
Interpolate self.Position X to 3450
When game.SwapHeadLeft = 2
Interpolate self.Position X to 2850
When game.SwapHeadLeft = 3
Interpolate self.Position X to 2250
When game.SwapHeadLeft = 4
Interpolate self.Position X to 1650
Move Right
When game.SwapHeadRight = 1
Interpolate self.Position X to 2250
When game.SwapHeadRight = 2
Interpolate self.Position X to 2850
When game.SwapHeadRight = 3
Interpolate self.Position X to 3450
When game.SwapHeadRight = 4
Interpolate self.Position X to 3950
Chris
http://www.youtube.com/watch?v=nlLFoseRkNA
The rules I set up are as follows inside the the Left button Actor
When touch pressed
change attribute game.SwapHeadLeft to game.SwapHeadleft + 1
attribute game.SwapHeadLeft > 4
change attribute game.SwapHeadLeft to 4.
and the same for the right button actor
Now Inside the Invisible holder I set up the following
Move Left
When game.SwapHeadLeft = 1
Interpolate self.Position X to 3450
When game.SwapHeadLeft = 2
Interpolate self.Position X to 2850
When game.SwapHeadLeft = 3
Interpolate self.Position X to 2250
When game.SwapHeadLeft = 4
Interpolate self.Position X to 1650
Move Right
When game.SwapHeadRight = 1
Interpolate self.Position X to 2250
When game.SwapHeadRight = 2
Interpolate self.Position X to 2850
When game.SwapHeadRight = 3
Interpolate self.Position X to 3450
When game.SwapHeadRight = 4
Interpolate self.Position X to 3950
Chris
Comments
Are you referring to the fact that the individual heads are moving because they are constrained, rather than on their own?