|
| 28 Aug 2012 11:14 PM |
I need help.
But - Firstly, hear on what.
There is no script. No script to fix.
There is no line. No line to change.
There is simply a question.
I am not requesting an entire script - If I were to get one, I would be grateful, but certainly not expecting it. Not really, atleast.
I just need some help, if you could.
I wish to create a script, but I have run into a problem.
The script is within a brick, and supposedly should cause the brick to fade away as you get closer.
Here's the problem I'm running into ;
The number.
Think about this. Let's say you're five blocks away. And the brick is visible.
You walk closer, now only three blocks away.
If five studs equals zero transparency,
Then how do three studs equal any less?
I can't use this ;
if dist == 3 then script.parent.transparency = script.parent.transparency - 2
Maybe I could do..
trans = script.parent.TRANS.Value
if dist == <5 then script.parent.transparency = trans - dist
...
No, that wouldn't work, either.. Hm.. What to do, what to do.. Help? |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2012 11:21 PM |
| Oh - You and your all-powerful scripting powers could certainly help a lowly noob like myself, yes? |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2012 11:23 PM |
brick.Transparency = 1 - dist/5
as dist approaches 0, transparency approaches 1, a negative number is equivalent to having a transparency of zero. |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2012 11:30 PM |
Just a tip, you get better responses if you are concise with your question, you won't get flamed unless you phrase it like this:
"I don't know how to do ___. Can someone please make it for me?"
Asking, "How would I go about doing blank? I have tried blank and blank. OR Blank and blank wouldn't work. Any help would be appreciated, thanks!" should get you the quick response you want. |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2012 11:34 PM |
You'd make a good writer.
This item is deprecated. Do not use it for new work. |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2012 10:42 PM |
Thank you.
I do participate in the creative writing section of the forum. |
|
|
| Report Abuse |
|
|
einsteinK
|
  |
| Joined: 22 May 2011 |
| Total Posts: 1015 |
|
|
| 30 Aug 2012 03:50 AM |
Distance = YouCalculateTheDistance
part.Transparency = 1-(distance/100)
Isn't that it? Seems simple but effective |
|
|
| Report Abuse |
|
|
| |
|