Constrain Behaviors Not Working

svnsvn Member Posts: 445
edited August 2012 in Working with GS (Mac)
I have an actor set up like so:
When AttributeX=-1
Constrain Attribute 'Self.Position.X" to '(Game.MainCharacter's X Position)-50'
Constrain Attribute 'Self.Position.Y" to '(Game.MainCharacter's X Position)+5'
(essentially constraining one actor 50 spots to the right and 5 spots above another actor)
When AttributeX=1
Constrain Attribute 'Self.Position.X" to '(Game.MainCharacter's X Position)+50'
Constrain Attribute 'Self.Position.Y" to '(Game.MainCharacter's X Position)+5'
(constraining the same actor now 50 spots to the LEFT and 5 spots above another actor)

But when I spawn the first actor, it stays where it is and its position does not change to that of the main character's.
What am I doing wrong?

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited August 2012
    Have you made sure the attributeX = the correct amount? i presume it starts at 0.

    You will need an integer to go into the minus are you using an index?

    Darren.
  • calvin9403calvin9403 Member Posts: 3,186
    and did you constrain Game.MainCharacter's X Position to your main character's position too?
  • svnsvn Member Posts: 445
    @Darren: I made sure that Attribute X is the correct amount( it is altered between 1 and (-1) by pressing the D and W keys, respectively). And yes, as can be inferred from the previous statement, I do have a negative integer.

    @Calvin: I have constrained Game.MainCharacter's X Position to the main character's X position.
Sign In or Register to comment.