Jump to content

can we control workshop lights(with own light source) with a switch ?


greekrage

Recommended Posts

As the question says...

 

Im trying to set up lighting with some new lights that have their own light source (activators) but want to control them all via light switch with my other light sources in the building.

 

I dont want the whole fixture to fade in and out .....I only want to control its light source....

 

Is it possible without making it too complicated by adding a script /property to the light or perhaps a keyword ?

Link to comment
Share on other sites

There are many lights that only emit light when powered..... is that what you are looking for?

No im looking for a way to control the light source attached to the fixture (nif).... Lets say the addon node.

Example if i link the light to a parent that is linked to a switch and enable/disable in game (switch lights on or off ) ...the whole fixture appears or disappears.

I want to control the light source only.

Right now when i create a room with a light i use a fixture without internal lighting and add light sources to it that are linked to the switch...

So instead of that i want to be able to use the light that has its own light source.

Why ?....

so players can scrap that light without leaving behind the light source...

 

Example of a light im want to use ....

rmjYgt.jpg

Edited by greekrage
Link to comment
Share on other sites

Is this something you're trying to accomplish with a CK build? If so here's a good tutorial for setting up lights to use enable/disable markers.

 

Otherwise, if you're trying to make custom working light fixtures that can be placed in game, and controlled by a switched power source, I use the WorkshopIndCatLight.nif, found in Meshes\SetDressing\LightFixtures to build off of. The key is having the right BSBehaviorGraphExtraData block, in this case GenericBehaviors\WorkshopNoTransitions\WorkshopNoTransitions.hkx, which essentially tells the game "turn on when powered, turn off when not". I choose that nif because it has the fewest number of NiControllerSequences that might need to be edited out of all the light fixtures that use that particular BSBehaviorGraphExtraData block. It doesn't contain a BSValueNode (addon node), but it's simple enough to add one and set up in the NiControllerSequences. You need a fair bit of Nifskope experience to do this, but is one of the easier workflows for that application.

 

If you have questions about building your custom fixture using this method, I'll be happy to walk you through it.

Link to comment
Share on other sites

I already know how to set up lights ....

 

The question is using a workshop light (turns on when powered)..... with a light switch as we do with light sources so that the workshop light depends on the switch to work but not disappear when switch is toggled to OFF state .

Nor do i want to place regular activated lights that the player has to walk up to to de-activate ...

 

Imagine a Hightechlightceling06 that can be turned on via lightswitch/enablemarker with other light sources in the house/room.

 

For now until i find a solution im making simple static fixtures and adding light sources that i can control(like ive been doing )... but this method is a problem when a player wants to scrap it and add his own lights because the light source remains...

 

Im thinking that maybe the approach would be to toggle the power of the light (like a real light works) and not enabling or disabling the light itself.... Is this a script issue or a nif issue......or both ?

Link to comment
Share on other sites

  • 2 weeks later...

You could create a copy of the workshop lamp NIF and remove the behavior graph data from it.

That then allows you to use PlayGamebryoAnimation() on the object to invoke it's animations, ie turning on/off the light.

Keep in mind that you will need to track state and update anims accordingly by yourself, as the engine only takes care of behavior graph stuff.

Link to comment
Share on other sites

I think you can change the light with a, setstate().

To have the light source disable when the light is scraped, link the light source to the lamp at it's enable parent tab.

For this im thinking a simple link of the sources to the fixture with the workshopstackedobject keyword (i think thats what its called) will do the job...like candles and their sources...or groups of scrappables

Link to comment
Share on other sites

You could create a copy of the workshop lamp NIF and remove the behavior graph data from it.

That then allows you to use PlayGamebryoAnimation() on the object to invoke it's animations, ie turning on/off the light.

Keep in mind that you will need to track state and update anims accordingly by yourself, as the engine only takes care of behavior graph stuff.

will try this in my next mod...

For now im doing it the hard way because ive been sidetracked way too much with all the texture swaps etc.. (im about a month overdue on this project)...

Edited by greekrage
Link to comment
Share on other sites

Also to clarify...

Yes even using lights with On when powered function would work in a standard settlement but i also provide power everywhere which means that all of those lights would have constant power and need to be switched on/off with their own activators instead of simply turning off a gen switch that you may have attacked to the building...

One of my main drives when doing a location is too make it as realistic as possible.....hence why i look for solutions like this one.... Its cool to walk up to a floor lamp to turn it off but going to a hanging ceiling light to do the same kills my sense of realism..

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...