Dont know if its really a mod im making really, its actually a pretty large player homevault
There are hundreds of houses available i know but since it feels like it was the easist to do since its my first modding attempt.
Anywho to the problem. Ive searched the forum and the Geck site and also google, found a couple of tutorials regarding scripting but they were pretty short and i didnt manage to get it to work even with the help from them.
Ive managed to create simple scripts like on / off scripts for lights etc. But now i want a couple of lights to switch on one after another in a timed sequence after the button is pressed. And when you press the button again i would like them to switch off on the same time (not in a sequence i.e). Dont know if this is even possible but i really hope so. Would make for quite som atmosphere in my vault.
Ive played around with three test glow statics just for testing purpose. Theese are named "one", "two" and "three" the swtich is named "TestSwitch" and is an activator. All objects are "Persistent Reference" enabled.
I modified the script that acts as the on/off switch script (wich works as it should)
ScriptName SequenceSwitchTEST
float fTimer
int iStage
short onoff
Begin OnActivate
if fTimer > 0
set fTimer to fTimer - GetSecondsPassed
elseif iStage == 0
Set onoff to "one".getDisabled
if onoff == 1
"one".Enable
Endif
set iStage to 1
set fTimer to 3
elseif iStage == 1
Set onoff to "one".getDisabled
if onoff == 1
"two".Enable
endif
set iStage to 2
set fTimer to 1
elseif iStage == 2
Set onoff to "one".getDisabled
if onoff == 1
"three".Enable
endif
If onoff ==0
"one".Disable
"two".Disable
"three".Disable
endif
endif
End
Is this all to hell wrong ? I might add that i have no prior programing language experience, hope someone is willing and have the time to help me out here a little
Peace all of you and thanks for all the mods !



Sign In
Create Account

Back to top









