Touch once turns attribute true touch again turns it false?
Player_E
Member, PRO Posts: 604
I want to be able to touch an actor once and turn a boolean attribute true, then touch it again and turn it false. Basically every touch turns it on then off, then on again
any thoughts?
any thoughts?
Comments
Rule: Boolean = true + touch is pressed. Change boolean to 0
Rule: Boolean = false + touch is pressed. Change boolean to 1
Thanks for the help guys.
But here is another brain buster i'm having. I now have multiple of the same actor on my screen and I want the above feature to apply.
the issue is this. If I just use
change attribute game.???? to (game.????+1)%2
When i touch another actor the numbers get mixed up and everything goes to hell.
Now I tried to introduce a self.attribute with the same properties.
This is what I have worked out so far:
When I touch 1st actor both the self and the game attribute turn to 1. and when I try to touch actor 2 (with game attribute still at 1) the game attribute stays at 1 and the 2nd actors self attribute stays at 0.
That is perfect exactly what I want.
Now the issue
When I touch actor 1 again expecting to turn self attribute and game attribute back to 0 it does not.
How would I work this out?
im off to work and will be back on tonight so hopefully I can go back at it tonight and see what I can get working
Rule: touch is pressed
> Rule:
> Attribute: self.myState is true
> Change Attribute: self.myState to false
> Otherwise:
> Change Attribute: self.myState to true