Why Does This Code Not Work?
FallingBoxStudios
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
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
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