Jump to content

need help with activating a lamp and activation sound


oldman42

Recommended Posts

I am trying to create a simple old-fashioned liquid-fuel lantern that can be switched on and off.

 

I created and populated an Activator Record usng FNVEdit.

 

"Dungeons\Caves\Lamplight\LamplightLamp.NIF" is the MODL - Model Filename.

 

UILockpickingCylinderSqueakB [sOUN:00045B3B] is the VNAM - Sound Activation.

 

The SNAM - Sound Looping field is empty.

 

The SCRI - Script is very simple and toggles the illumination on and off. but the activation sound is a standard activation sound and not the one in the VNAM field. How do I change the activation sound?

 

The second problem is I would like to have the lantern appear to be off, when it is off. The mesh in the MODL field is a lamp that appears to be on. There is a separate mesh for the same lamp that appears to be off, but I have not found a method to switch them dynamically.

 

Regarding the latter, I examined lamps that turn on and off in the Active Wasteland and NVEC mods using FNVEdit, but found no obvious differences with what I am already doing.

 

Can anyone help?

 

Thank you.

 

Oh...and here is the SCRI - Script, if that helps:

ScriptName mobileHomeLightSwitch
ref	light
begin OnActivate
Activate
if ( light == 0 )
	set light to PlaceAtMe mobileHomeLight 1
else
	light.Disable
	light.MarkForDelete
	set light to 0
endif
end

Edited by oldman42
Link to comment
Share on other sites

I appreciate an inquiry that provides a lot of detail. That said,

 

Regarding the latter, I examined lamps that turn on and off in the Active Wasteland and NVEC mods using FNVEdit, but found no obvious differences with what I am already doing.

 

there were some things you missed when examining the Active Wasteland lamp:

 

1. The script plays the sound. (I guess the setting the sound in the activator doesn't work.)

2. Unlike the lamp you are trying to use, the Active Wasteland lamp model itself has nothing to indicate light. The use of placeatme and disable is what is causing the transition between appearing on and appearing off.

 

The sound is an easy fix. I'm not good with graphics so I can't help you with the light.

Link to comment
Share on other sites

there were some things you missed when examining the Active Wasteland lamp:

 

1. The script plays the sound. (I guess the setting the sound in the activator doesn't work.)

2. Unlike the lamp you are trying to use, the Active Wasteland lamp model itself has nothing to indicate light. The use of placeatme and disable is what is causing the transition between appearing on and appearing off.

Thank you.

 

I had tried the PlaySound3D, but that played both the sound and the loud click.

 

Unfortunately, my problem description was incorrect. The sound I was hearing was not an activation sound, but its opposite: the sound the game makes when the activate key is pressed over an object that is not an activator. I reread the manual section for onActivate and realized that since onActivate is run instead of the regular activation, the UI functions as if no activation has occurred: performing no actions on the data in the Activator record and making that loud warning click. I added an Activate call to the script and that solved my problem. :D

 

Thanks for the info on the lamp shades in the Active Wasteland mod. I know so little about graphics that I had incorrectly assumed that illumination from inside the lampshade would not light-up the lampshade itself.

Edited by oldman42
Link to comment
Share on other sites

  • Recently Browsing   0 members

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