zepprith Posted June 3, 2009 Share Posted June 3, 2009 i am making a gate that is locked and the only way to open it is to use a lever a pretty simple concept i used the light switch scripted on the elderscrolls wiki because it seemed pretty much like the same action to me but when i use the lever it disappears along with the gate it opens here is the scripted i used scn OrcGateLever ref parent Begin OnActivate set parent to getParentRef if GetDisabled == 0 if parent != 0 if parent.getDisabled == 0 parent.disable else parent.enable endif endif disable else if parent != 0 if parent.getDisabled == 0 parent.disable else parent.enable endif endif enable endif End Link to comment Share on other sites More sharing options...
XJDHDR Posted June 3, 2009 Share Posted June 3, 2009 The gate and switch are disappearing because the script you are using disables the switch and gate. Replace the script with this one: Begin [Whatever name you want to give your script in one word] Ref Parent Begin OnActivate Set Parent to GetParentRef Playgroup Forward 0 If Parent.GetLocked Parent.Unlock EndIf End Make sure you are attaching the script to a new object reference, as opposed to a reference which already exists in Oblivion. Ohterwise, you will cause problems. Link to comment Share on other sites More sharing options...
zepprith Posted June 3, 2009 Author Share Posted June 3, 2009 thanks for telling me to make i new object reference but when i try and save the script it tells me to add a script name so i do it but then i try and save again and i get Nested begin/end box are not allowed Link to comment Share on other sites More sharing options...
Argomirr Posted June 3, 2009 Share Posted June 3, 2009 It's because of that "begin" on top of the script. It should be "scn" or "scriptname", like this:Scn [ScriptNameHere] Ref Parent Begin OnActivate Set Parent to GetParentRef Playgroup Forward 0 If Parent.GetLocked Parent.Unlock EndIf End Link to comment Share on other sites More sharing options...
zepprith Posted June 3, 2009 Author Share Posted June 3, 2009 ok now it says syntax error missing script name (this is alot of trouble for something so small) Link to comment Share on other sites More sharing options...
Argomirr Posted June 4, 2009 Share Posted June 4, 2009 Wait, it says it's missing a scriptname? If there's a line saying "Scn [scriptname]", for example "Scn MyScript" (without quotes, of course) on the first line of the script, it shouldn't say that. Check again, that line might be missing. Link to comment Share on other sites More sharing options...
XJDHDR Posted June 5, 2009 Share Posted June 5, 2009 Sorry, that's what happens when you don't check what you've written. Anyway, I agree with Argomirr. If you're using his revised script, there shouldn't be any problems. Try copy-paste that script into the CS then replace [scriptNameHere] with the name you want. Link to comment Share on other sites More sharing options...
zepprith Posted June 6, 2009 Author Share Posted June 6, 2009 ya that was the problem thanks for the help Link to comment Share on other sites More sharing options...
XJDHDR Posted June 6, 2009 Share Posted June 6, 2009 Don't mention it! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.