Hey, here is my newest question.
I am VERY new to scripting, and I was wondering if I could, and if so how, could I script a removal of a light when picking up an item.
So, there is a luminated object, and it would look weird if it's lumination persisted after it was removed.
Cheers.
Remove Light Scipt
Moderators: Haplo, Lead Developers
- BethesdaLove
- Member
- Posts: 23
- Joined: Mon Aug 17, 2009 9:39 pm
- Location: Essex, England, Under the Stairs
- Contact:
Quite possible.
The cleanest way to do it would probably be to check the "References Persist" box on your light and then apply this script to your object:
The cleanest way to do it would probably be to check the "References Persist" box on your light and then apply this script to your object:
Code: Select all
Begin ScriptName
short doOnce
if ( OnActivate == 1 )
if ( doOnce == 0 )
IDofYourLightHere->Disable
set doOnce to 1
endif
endif
end
- BethesdaLove
- Member
- Posts: 23
- Joined: Mon Aug 17, 2009 9:39 pm
- Location: Essex, England, Under the Stairs
- Contact:
Well, the script removes the light, but stops me from picking up the object. Illumination gone, source remains.Evil Eye wrote:Quite possible.
The cleanest way to do it would probably be to check the "References Persist" box on your light and then apply this script to your object:Code: Select all
Begin ScriptName short doOnce if ( OnActivate == 1 ) if ( doOnce == 0 ) IDofYourLightHere->Disable set doOnce to 1 endif endif end
Thanks for the speedy and effective reply though, works fine, just if anybody knows how to iron out this crease.
Oops forgot a line there.
This'll fix your problem.
Code: Select all
Begin ScriptName
short doOnce
if ( OnActivate == 1 )
if ( doOnce == 0 )
Activate
IDofYourLightHere->Disable
set doOnce to 1
endif
endif
end
- BethesdaLove
- Member
- Posts: 23
- Joined: Mon Aug 17, 2009 9:39 pm
- Location: Essex, England, Under the Stairs
- Contact: