Light Scripts

Post » Mon Jun 18, 2012 2:45 am

The Wiki page is pretty light on the details.

I'm trying to make a "Rainbow" light source, but the default Light object contains a static RGB value. I see that it allows you to attach a script, however, so I need to figure out how to set the color with a Papyrus script. I can figure out the linear interpolation logic and all that once I can set the color.

I'm thinking something like this:



Scriptname RainbowLightScript extends FormEvent OnLoad() ; As soon as this instance enters the world     registerForUpdate(0.5)EndEventEvent OnUpdate() ; Should update twice a second     ; Cycle through rainbow colorsEndEvent
User avatar
BEl J
 
Posts: 3397
Joined: Tue Feb 13, 2007 8:12 am

Post » Sun Jun 17, 2012 8:00 pm

You're making a rave aren't you?
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Post » Sun Jun 17, 2012 4:13 pm

Actually, I'm trying to make a projectile spell with a rainbow trail. I figured I'd start with the light.

On that note, I also can't figure out where to access Skyrim's .NIF files...
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Sun Jun 17, 2012 7:24 pm

You need to use a BSA extractor to extract them from the meshes BSA.
User avatar
remi lasisi
 
Posts: 3307
Joined: Sun Jul 02, 2006 2:26 pm

Post » Mon Jun 18, 2012 12:59 am

You need to use a BSA extractor to extract them from the meshes BSA.
Awesome, thanks.


So no one knows anything about the Light scripts?
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Sun Jun 17, 2012 4:17 pm

The http://www.creationkit.com/Light_Script doesn't have any specific functions that you could use to change colour, so you'll probably just have to http://www.creationkit.com/Disable_-_ObjectReference and http://www.creationkit.com/Enable_-_ObjectReference a series of lights of different colours that are in the same place.

Cipscis
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Sun Jun 17, 2012 8:19 pm

I have no idea how you're planning on getting the lights to cycle through different colours.. I have a feeling it's much more intricate than you're thinking it is. And if it was possible, I don't think someone's going to pop in and give you the code you need.

However it does sound pretty cool and I hope you can get it to work! An alternative idea which may be more rudimentary is to have all the different light colours and just enable/disable them one at a time. You should be able to set the speed. I just don't think there are enough distinguishing colours for light in the game.


Edit: Ninja by Cipscis himself!
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

Post » Sun Jun 17, 2012 10:31 pm

The http://www.creationkit.com/Light_Script doesn't have any specific functions that you could use to change colour, so you'll probably just have to http://www.creationkit.com/Disable_-_ObjectReference and http://www.creationkit.com/Enable_-_ObjectReference a series of lights of different colours that are in the same place.

Cipscis
I have no idea how you're planning on getting the lights to cycle through different colours.. I have a feeling it's much more intricate than you're thinking it is. And if it was possible, I don't think someone's going to pop in and give you the code you need.

However it does sound pretty cool and I hope you can get it to work! An alternative idea which may be more rudimentary is to have all the different light colours and just enable/disable them one at a time. You should be able to set the speed. I just don't think there are enough distinguishing colours for light in the game.


Edit: Ninja by Cipscis himself!

Thanks guys. I'll go ahead and try that.

Oh, and I wasn't expecting any block of code. I probably should have specified, I was looking for a way to set the current RGB value of the light, like a "setAttribute("RGB", 30, 255, 120)" or something.
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am


Return to V - Skyrim