If touch is pressed change self.physics.movable to true??? [Problem]
Hey Forum,
I am having some difficulties, with something I thought would have been fairly straight forward...
I have an actor that has its self.physics.movable attribute set to false. I would like to enable this on touch, so I have,
If touch is pressed, change self.physics.movable to true
and another rule that says,
If self.physics.movable is true accelerate 270degrees relative to scene by a magnitude of 1000
This does not seem to work, is this a problem with gamesalad or is this action not possible?
Thanks,
EI8HTHSIN
I am having some difficulties, with something I thought would have been fairly straight forward...
I have an actor that has its self.physics.movable attribute set to false. I would like to enable this on touch, so I have,
If touch is pressed, change self.physics.movable to true
and another rule that says,
If self.physics.movable is true accelerate 270degrees relative to scene by a magnitude of 1000
This does not seem to work, is this a problem with gamesalad or is this action not possible?
Thanks,
EI8HTHSIN
Best Answer
-
expired_012 Posts: 1,802
You can't change the self.movable attribute while the game is running as far as I know. Ex. If you have self.physics.movable set to false it will stay that way even if you tell it to turn true when touched.
Answers
Cheers
You can create the same conditions by creating a boolean (e.g. self.canMove) and then changing the value when needed and also creating a rule that checks the value of the boolean to allow/disallow movement.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks once again and happy apping!
EI8HTHSIN