Hey guys,
I’ve done some hunting through the forum and eleswhere and for whatever reason (newbie-ism, most likely) I can’t get a script to work.
What I’m attempting to do is fade an object out once an input key is hit. I have everything else setup and working (meaning the triggers, inputs, IF statements, etc)…it’s the changing the material once that IF statement becomes True.
I’ve seen that I need to use a Transparent shader, but how is that tied to the Alpha that the sample scripts I’ve seen call? Basically…what am I missing??
Thanks for any help,
Chris
Have a look at this fade script on the wiki.
–Eric
I’ve been all over that entry and again, it’s probably just ignorance, but I still can’t make it function.
I copied the large script at the bottom and place it into my scene, but I get the error BCE0018: The name ‘Fade’ does not denote a valid type.
Are there some generic calls that I need to swap out some code to make it jibe with my scene?
Again, I apologize about the uber newbieness of this.
Thanks for your help.
Ok…It finally clicked and I was able to get everything working.
Next question is about that Fade.js. Where is it in the code so that I can kill the ‘return’ to the original color? Basically to have to only perform half the cycle.
Thanks…
It doesn’t actually return to the original color at all, depending on what method you’re using.
// Fade out, from 1.0 to 0.0, over 3 seconds
Fade.use.Alpha(renderer.material, 1.0, 0.0, 3.0);
–Eric