false problem
15 posts • Page 1 of 1
false problem
if statements seem to have trouble with boolean. or am i doing it wrong?
- Code: Select all
{scene.my.blah==false}?{e.this/geom.color=e.other/geom.color}:{}
-

FuzzyLogicBrain - Posts: 315
- Joined: Mon Jan 31, 2011 7:48 pm
- Location: when online, on the computer. when not, probably on it anyways. ;D lulz
Re: false problem
That is why I use the original boolean-- 1s and 0s
Also, use color=e.geom.color, not e.this.color=e.geom.color
Also, use color=e.geom.color, not e.this.color=e.geom.color
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: false problem
try using := instead of ==
Generally when an if code dosnt work, that is the first thing i check as i dont understand the ='s and havnt got round to learning them
Generally when an if code dosnt work, that is the first thing i check as i dont understand the ='s and havnt got round to learning them
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: false problem
electronicboy wrote:try using := instead of ==
Generally when an if code dosnt work, that is the first thing i check as i dont understand the ='s and havnt got round to learning them
hmmm..
TC42 wrote:That is why I use the original boolean-- 1s and 0s![]()
Also, use color=e.geom.color, not e.this.color=e.geom.color
1s and 0s! duh i do that too
-

FuzzyLogicBrain - Posts: 315
- Joined: Mon Jan 31, 2011 7:48 pm
- Location: when online, on the computer. when not, probably on it anyways. ;D lulz
Re: false problem
You want this:
a = 2 means "Set the value of a equal to 2."
a == 2 means "Check if the value of a is 2."
a := 2 means "Create a new variable with identifier a and value 2."
- Code: Select all
{!scene.my.blah} ? {color = e.other.color} : {}
a = 2 means "Set the value of a equal to 2."
a == 2 means "Check if the value of a is 2."
a := 2 means "Create a new variable with identifier a and value 2."
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: false problem
Someone Else wrote:You want this:
- Code: Select all
{!scene.my.blah} ? {color = e.other.color} : {}
a = 2 means "Set the value of a equal to 2."
a == 2 means "Check if the value of a is 2."
a := 2 means "Create a new variable with identifier a and value 2."
Thanks for telling me what they mean
And as you can tell, i havnt really learn much thyme
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: false problem
I'm actually not completely sure about :=, but you use friction := 2 in spawning, so I made a guess.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
-

FuzzyLogicBrain - Posts: 315
- Joined: Mon Jan 31, 2011 7:48 pm
- Location: when online, on the computer. when not, probably on it anyways. ;D lulz
Re: false problem
When put right before a boolean, ! means "not".
{collideWater} ? {} : {} means "if collideWater is true..."
{!collideWater} ? {} : {} means "if collideWater is not true, or false..."
{collideWater} ? {} : {} means "if collideWater is true..."
{!collideWater} ? {} : {} means "if collideWater is not true, or false..."
- The full list of IF operators:
- == means "If the values are equal"
- != means "If the values are not equal"
- >= means "If the first value is greater than or equal"
- <= means "If the first value is less than or equal"
- > means "If the first value is greater"
- < means "If the first value is less"
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: false problem
Someone Else wrote:I'm actually not completely sure about :=, but you use friction := 2 in spawning, so I made a guess.
This has been explained so many times (mostly by me). := is ONLY used in spawning (well, creating new variables, actually, but that's what you do when you spawn something).
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: false problem
Someone Else wrote:When put right before a boolean, ! means "not".
{collideWater} ? {} : {} means "if collideWater is true..."
{!collideWater} ? {} : {} means "if collideWater is not true, or false..."The full list of IF operators:
- == means "If the values are equal"
- != means "If the values are not equal"
- >= means "If the first value is greater than or equal"
- <= means "If the first value is less than or equal"
- > means "If the first value is greater"
- < means "If the first value is less"
Oh snap! Thanks for the explantion!
{!badExplantion}?{compliment}:{troll}
-

FuzzyLogicBrain - Posts: 315
- Joined: Mon Jan 31, 2011 7:48 pm
- Location: when online, on the computer. when not, probably on it anyways. ;D lulz
Re: false problem
Thanks... though, actually, you want something more like
- Code: Select all
scene.my.reply = {!scene.my.badExplanation} ? {"compliment"} : {"troll"}
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
-

FuzzyLogicBrain - Posts: 315
- Joined: Mon Jan 31, 2011 7:48 pm
- Location: when online, on the computer. when not, probably on it anyways. ;D lulz
Re: false problem
Yes.
But this is off-topic.
But this is off-topic.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: false problem
no, this....... IS.......... SPAAARRRTAAA! yeah, so it is.
-

FuzzyLogicBrain - Posts: 315
- Joined: Mon Jan 31, 2011 7:48 pm
- Location: when online, on the computer. when not, probably on it anyways. ;D lulz
15 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests





