Boolean True On Click?
Peter_J
Member Posts: 17
Hello all,
How do I make a boolean attribute "true" when you click an object?
Thanks in advance!
Regards,
Peter
How do I make a boolean attribute "true" when you click an object?
Thanks in advance!
Regards,
Peter
Comments
Rule:
When touch is pressed,
Change attribute game.boolean to true.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Add behaviour : Change attribute True/False
Regards,
-Peter
This will result in possible endless loops. I would go with a numerical attribute. So when touch is pressed Change Attribute game.NumericalTF = 1-game.NumericalTF
Then is just switches between 0 and 1 and there are no endless loops.
When touch is pressed
--change attribute to (game.attribute+1)%2
That will also switch back and forth between 0 and 1 for each press of the actor.
Just goes to show you there's more that one way to skin a cat...
Lol