Button - touch & release
Hi guys!
I have a problem with my button - I want it to work like this - when button is pressed, and THEN touch is released, camera changes its origin.
It's pretty easy, I have a rule:
If TOUCH is PRESSED, and Camera Origin is X
Timer - after 0.1 second (run to completion)
If TOUCH is RELEASED, and Camera Origin is X
Change attribute Camera Origin to Y
It works fine to change Camera from X to Y, BUT when I get the Camera back to X, it's automatically changes Camera to Y.
And I have no idea how to fix it.
Could you give me a hand?
Thank you!
I have a problem with my button - I want it to work like this - when button is pressed, and THEN touch is released, camera changes its origin.
It's pretty easy, I have a rule:
If TOUCH is PRESSED, and Camera Origin is X
Timer - after 0.1 second (run to completion)
If TOUCH is RELEASED, and Camera Origin is X
Change attribute Camera Origin to Y
It works fine to change Camera from X to Y, BUT when I get the Camera back to X, it's automatically changes Camera to Y.
And I have no idea how to fix it.
Could you give me a hand?
Thank you!
Comments
If TOUCH is RELEASED, and Camera Origin is X
Change attribute Camera Origin to Y
Roy.
I can do it, but it doesn't work either:
If TOUCH is RELEASED, and Camera Origin is X
Change attribute Camera Origin to Y
It works fine to change Camera from X to Y, BUT when I get the Camera back to X, it's automatically changes Camera to Y.
I suggest this :
Create a self attribute - boolean - call it "im touched"
Then a rule , when touch is pressed
Change "self.im touched" to true
After 0.2 (run to completion) change "self.im touched" to false
Now another different rule (not nested):
when "self.im touched" IS true
When touch is released
Change attribute Camera Origin to Y
It should work i hope
Roy.