Jump to content

How to get a klaxon light to work?


Guest Messenjah

Recommended Posts

Guest Messenjah

So, I've been fighting with this for a while..... I can't seem to get a Klaxon light to work correctly. Basically, I've tried using the default light and default script and linking it to an activator switch, using the activator switch as an activate parent. The light simply defaults to on. It seams that the begin onload script keeps defaulting the light to "on".

 

Basically, I just want a light that is on when a door is open and off when it is closed. I even tried writing my own klaxon light script:

 

 

SCN FFSecretKlaxonScript

Begin OnActivate

if FFSecretDoor.GetOpenState == 3
Playgroup left 1
elseif FFSecretDoor.GetOpenState == 1
Playgroup left 0
Endif
End

 

I have also tried setting up a script on the switch its to activate the klaxon as a reference ID. Nothing, it just defaults to "on".

 

What I am doing wrong? This worked fine when I did it with a vault console activator in Fallout 3. :P

Link to comment
Share on other sites

Assuming that script goes on the light...

 

Try putting the entire thing under GameMode. As of now, it will only update when you manually reach for the light object and activate it.

Edited by Glenstorm
Link to comment
Share on other sites

If you place the default Klaxon and Klaxon light object, you simply need to activate them somehow to turn them on or off. If you only have one klaxon you can do MyKlaxonRef.Activate, or; if you have many klaxons, place as switch floating somewhere outside of your level, make it the activate parent of all the klaxons and light objects, then say MyKlaxonSwitchRef.Activate. That will turn them on or off. Easy as pie. Edited by AlexanderJVelicky
Link to comment
Share on other sites

Guest Messenjah

I've tried this several times in several different ways....

 

The problem is that the looping animation plays onLoad instead of OnActivate. :(

 

So, it is on, EVERY SINGLE TIME I enter my cell without me touching anything and the animation refuses to shut off for some weird reason. If I attach an activator switch to it as an activate parent, it will simply restart the loop and run it again but it refuses to shut the loop off.

 

I've tried adding it in as a custom light and only using the portion of the script that relates to OnActivate and it still refuses to work.

Link to comment
Share on other sites

Guest Messenjah
Nope, just one single light. Actually, I got it to shut off. I think I had it flagged to be on by default somehow. It appears that the on-load portion of the script may cause a bug with the light. For some reason, whenever the light "loads" and the script is checked "on-load" it seems to "stick" to the state that it assigned to and can not be changed for some odd reason. :\ I'm re-scripting it by hand and it seems to be working a bit better now.... so far.
Link to comment
Share on other sites

Hi.

 

Looking at the script you posted I noticed this: The commands “PlayGroup Left 1” and “PlayGroup Left 0” both turn the klaxon light “on”. The integer parameter just controls how the given animation should start in case the activator is already playing a animation. It does not stop it.

 

To turn the light off you should use “PlayGroup Backward 1” instead. “Backward” is a short, non-looping animation of the klaxon turning “off”.

Link to comment
Share on other sites

Guest Messenjah
Yep, I actually re-worked the script today. I don't get a lot of sleep these days so a lot of my scripts end up with weird flaws. I had been fighting with this project for about 3 days between college, homework, and taking care of the family. Anyway, managed to fix it tonight. Thanks guys for the assist, even though I kinda ended up fixing it myself. I think the OnLoad was causing part of the problem. It's odd, my script isn't really that different from the default Klaxon script, just no OnLoad and the GameMode script is slightly different. Fallout seems to read it a tad bit better now. I had to make it custom in the end anyway because the loop animation is looped with a gamemode script and I needed it to interact with a door as well so that between both switches I have linked that door, it won't fall out of sequence. :)
Link to comment
Share on other sites

  • Recently Browsing   0 members

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