[ [ Script ] ] Color Conversion + Light Manipulation
Posted: Tue Oct 28, 2014 7:47 pm
Out of Order
Official Legend of Grimrock Forums
http://almosthumangames.com/forum/
To dynamically change light colors, turn off particles, fade out lights with other scripts (that you make) using calculation instead of hard/hand-coding it into every script you want to manipulate lighting.Drakkan wrote:what is this script for ?
Yes, lighting color and pointLight color can be changed. Still trying to figure out particle colors. I think I've been looking in the wrong places to do this.Drakkan wrote:I can change light of color ?
You don't.Drakkan wrote:Do I need define object for it ?
SureDrakkan wrote:any examples ?
Code: Select all
library.script.GFX.light({"ceiling_light_20", "ceiling_light_21"}, "red") -- turn these two lights red
library.script.GFX.light({"ceiling_light_20", "ceiling_light_21"}, {"red","33ff21"}) -- turn the first light red, the second a light green
library.script.GFX.light("someLight_01", _, 0, 20000) -- fade out someLight_01 over 20 seconds
library.script.GFX.light("someLight_01", "purple", 0, 5000) -- turn someLight_01 purple then fade it out over 5 seconds
library.script.GFX.light("someLight_01", _, 1, 2000) -- fade in someLight_01 over two second
library.script.GFX.light({"light01","light02","light03","light04","light05","light06","light07"}) -- toggle all 7 lights
library.script.GFX.light("someLight_01", "#3333ff", _, _, _, 0) -- shut off only the particle effects, the light stays AND was turned blue
-- too many permutations for examples but I hope you get the picture
Make a script_entity, rename the ID 'library'. That's it.Drakkan wrote:How to do that ?
Groovy! And no worries about the credit. A reply of [gratitude|feedback|criticism{constructive|inflammatory}] in the thread you find any of my scripts works well enough. ~cheers~Drakkan wrote:aaaah, I tried some of these examples and it is really wonderfull. I do not think I am able to use whole potencial of this, however still thanks a lot, I can use it for some riddles and will definitey credit you !
crediting you is the smallest thanks I can do right now. I will probably need some specific color changes / effect, will send you PM eventaully. Thanks once again.NutJob wrote:Groovy! And no worries about the credit. A reply of [gratitude|feedback|criticism{constructive|inflammatory}] in the thread you find any of my scripts works well enough. ~cheers~Drakkan wrote:aaaah, I tried some of these examples and it is really wonderfull. I do not think I am able to use whole potencial of this, however still thanks a lot, I can use it for some riddles and will definitey credit you !
Anytime, but it has limitations and bugs currently until I get documentation. I'm sort of winging-it right now and hope to make it a lot more robust, feature rich, and applicable to other objects. Not just light. I was working on a strobe effect that can be applied to any light but removed it before copying it here. It [strobe] "sort of" worked but requires making a timer/script dynamically and was having some problems with it's destruction, too many timers populating, and some logic errors (mostly programmer error heh).Drakkan wrote:will send you PM eventaully.
Which ceiling light? I suppose I never checked them all and perhaps(?) not all have 'pointlight' ... let me know. I assumed they all had it and it was the "glare" effect for realism. When I get back to my computer at home I'll do more testing. (at office atm)kelly11 wrote:what am i doing wrong. i made a script entity library and put your code into it. Then I made a ceiling light