Constraining Consternation

svnsvn Member Posts: 445
edited November -1 in Working with GS (Mac)
I'm trying to constrain a Game-level attribute to the player's Linear Velocity [X], but it didn't work. What should I do?

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Suppose your game-level attribute was called "savedVelocity" you would put the following behavior into the actor:

    Constrain Attribute: game.savedVelocity To:self.Motion.Linear Velocity.X

    Hope that helps,
    RThurman
  • svnsvn Member Posts: 445
    @ Uptimistik:
    Well, I'm making a puzzle game where you have to destroy blocks so that Block A will land on Block B. To save time, I made a little barrier actor that will recognize when Block A touches it. The game itself is only supposed to recognize a win when Block A is not moving at all.
    So here's the logic: [BARRIER]: when collide with {Block A}, and Attribute: 'game.BlockVelocity'=0, then: "Change Attribute: game.Win to True".
    But the game won't let me constrain linear velocity. I tried using an Integer attribute first, and now I'm trying a Real attribute for game.BlockVelocity.

    What do I do?
Sign In or Register to comment.