Why Does This Code Not Work?

FallingBoxStudiosFallingBoxStudios Freelance Graphic DesignerMember Posts: 822
Hi, I'm trying to make an actor follow my touch, I have managed to make it work, but I want to add a limit to how far it can go out of the screen/ (so it does not go out fully) I found a way, heres what I did:
Constrain Attribute: self.Position.Y To: min(max(game.Mouse Position.Y,65),225).
I have done this before and it worked perfectly, but I don't know why it won't work any more :-O am I doing something wrong? :-S
Any help will be appreciated. Thanks.

- Hunter

Comments

  • zweg25zweg25 Member Posts: 738
    Hi RockitGames,
    The code seems correct, is your game landscape though? If so, it would be: max(game.Mouse Position.X,65) not mouse.position.Y.

    Hope this helps
    zweg25
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    edited November 2013
    @zweg25 No :( its portrait, When I did it before, it was landscape though :/
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    edited November 2013
    No problem, I managed to figure it ;)
Sign In or Register to comment.