integer problems

Hello everyone,
So I am just starting with Game Salad, and I'm not a programmer or coder by any stretch, but I can do a bit of mel scripting in Maya. I am trying to get a simple interger visible/ not visible option to work on an actor. I have read the forums, and found a very useful post that said to setup a new integer attribute on my object I want to control the visibility of, make it an integer, then use that to control the alpha of the object in the color menu. Then make a "button" actor to control the visible/invisible state in game. However, it doesnt work for me. I know the only part of the process that doesnt work is the last step. Changing the attribute to change the state of the alpha using ("attribute name"+1)%2 I know everything else works because I can change anything else using the new attribute I setup. Position, rotation, etc.. It all works, but when I try to connect it to the alpha using that expression. It never works. I also saw another post that said the correct expression is ("attribute name"+)%2 , but that didnt work either.

hoping anyone out there can help!

Thanks,
Doug Wolf

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    First you can't use an integer as the don't do decimal places. You need to use a real attribute. Alpha state is 1 full visibility and 0 invinsable everything in between is decimal so 50% visibility would be .5. Integers only do whole numbers. Real attributes will register decimal places.
Sign In or Register to comment.