if then or if then- problem
6 posts • Page 1 of 1
if then or if then- problem
hey i got a problem.
what am i making wrong?
Keys.bind
(
"a", {scene.my.var == 0.5} ? {scene.my.Var = 0}
||
{scene.my.var == 0 ? scene.my.var 0.5}
)
i want that:
if i press "a"
and var = 0,5
then it should be 0
but if it is 0
it should be 0.5...
can someone help?
what am i making wrong?
Keys.bind
(
"a", {scene.my.var == 0.5} ? {scene.my.Var = 0}
||
{scene.my.var == 0 ? scene.my.var 0.5}
)
i want that:
if i press "a"
and var = 0,5
then it should be 0
but if it is 0
it should be 0.5...
can someone help?
-
KaLul - Posts: 29
- Joined: Fri Sep 11, 2009 8:14 pm
Re: if then or if then- problem
- Code: Select all
Keys.bind("a", {scene.my.var == 0.5 ? {scene.my.var = 0} : {scene.my.var == 0 ? {scene.my.var = 0.5} : {}}})
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: if then or if then- problem
ok... well....
that doesnt work... i think thats cause if scene.my.var = 0 , it has not longer to do with scene.my.var.
because it is 0!!!
damn... i want the attraction of an object change by pressing. how can i do that?
that doesnt work... i think thats cause if scene.my.var = 0 , it has not longer to do with scene.my.var.
because it is 0!!!
damn... i want the attraction of an object change by pressing. how can i do that?
-
KaLul - Posts: 29
- Joined: Fri Sep 11, 2009 8:14 pm
Re: if then or if then- problem
I tested it and it works. In the attraction part of the script menu on an object put {scene.my.var} in there.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: if then or if then- problem
attention!
do not bind keys with scripting if you want to upload the files to algobox because you will change the config settings of the users that download and open your scene. it's the same with the water particle changes you wanted to make. that would be really annoying
do not bind keys with scripting if you want to upload the files to algobox because you will change the config settings of the users that download and open your scene. it's the same with the water particle changes you wanted to make. that would be really annoying
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 20 guests