OzzyBlox
|
  |
| Joined: 04 Nov 2009 |
| Total Posts: 14166 |
|
|
| 01 Jan 2012 09:11 AM |
Say:
Brick.Transparency = nil
and
Brick.Transparency = 0 |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 01 Jan 2012 09:12 AM |
| I don't think there's a difference. |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 01 Jan 2012 09:15 AM |
| I tested, there isn't a difference. |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
|
| 01 Jan 2012 09:16 AM |
| Nil, is just used in a sense of sort of imagination, while 0 has a value. You can still do arithmetic operations with 0, but not with nil, because it is really, undefined. |
|
|
| Report Abuse |
|
|
Leeav
|
  |
 |
| Joined: 07 Sep 2006 |
| Total Posts: 1905 |
|
|
| 01 Jan 2012 09:17 AM |
| Example: print(1*0) --Results in 0, print(1*nil) -- Can't be done |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2012 12:02 PM |
0 is a number, while nil is nothing whatsoever.
An arithmetic problem such as: 2 * 0 Would result in 0, but a problem such as: 2 * nil Will come up inconclusive.
In the Transparency problem you mentioned, 0 is the default value for transparency. Since nil is not an acceptable value for Transparency, it will default to 0. Same thing will happen in Reflectance, etc. |
|
|
| Report Abuse |
|
|