I need help with this logic problem - Video included

cmw333cmw333 Member Posts: 76
edited November -1 in Working with GS (Mac)
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

Comments

  • hotMagichotMagic Member, PRO Posts: 266
    That's a nice menu. Do you mean the problem is how it does that zip thing where it goes through all of them? Because it looks like it behaves well most of the time...
  • cmw333cmw333 Member Posts: 76
    I mean I cant move between individual actors. So for instance If I wanted to move between actor "head 1" and "head 2" i can't do it because of the way I set the rules inside the button actor. I only know this way to make a button but know it must be so simple for someone who has done something similar.
  • hotMagichotMagic Member, PRO Posts: 266
    It looks like you are doing it right... I guess im missing your question..

    Are you referring to the fact that the individual heads are moving because they are constrained, rather than on their own?
Sign In or Register to comment.