Changing Boolean with change attribute?
igpxnaruto4
Member Posts: 81
How do i change a Boolean with change attribute?
This discussion has been closed.
Comments
Change attribute:
game.yourattriubute to true.
Or, if you wanted to change it to false do this:
game.yourattriubute to false.
Hope this helps
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Asymptoteell
What E?
Make a interger attribute and call is soundOff have it set to 0
Have a rule when touch is pressed:
change attribute to (soundOff+1)%2
then have a rule when attribute soundOff =1
change attribute device sound volume to 0
and change image to sound off button image
then open up the otherwise section of that rule and inside there have this:
change attribute device sound volume to 1
change image to sound on button image
cheers
cheers
I dont know how I would change this to true or false, I tried 1 for true and 0 for false. There is no true or false that I found in the "e".
I thought these are the best attributes for on/off buttons.
Lowercase true or false is all you need for a Boolean.
And yes integers are another good option but keep in mind they use a minuscule amount more ram from what I'm told so loads and loads of them could actually make a difference. But either way is really pretty good.
I get this work. I hope it work too for you
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@igpxnaruto4
... or: 0 or 1.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps