how do you make button stay pressed/ touched
vindictuss@yahoo.com
Member, PRO Posts: 55
im trying to make a button that will stay pressed unless clicked for the second time, is there a way i could do that?
Comments
@vindictuss@yahoo.com
Yes make an integer self attribute , call it switch ,
make a rule , when touch is pressed
change attribute self.switch to mod((self.switch+1),2)
**This will change self.switch to 1 or 0 **
then create a rule that says
when attribute self.switch = 1
do whatever you want
otherwise
do what ever you want .
so now when you press on the actor it will either be 1 or 0 , if its one you can put in your rules and otherwise if its 0 you can put your other rules , and it will switch everytime you touch it.
Edit : in case you didnt understand there is a youtube tutorial by gamesalad guru its called Mod , i couldnt paste the link cause youtube is not working at the moment on my computer sorry.
Hope this helps , good luck
Try something like this.
thank you RThurman and IceBox1910 you helped me a lot