Jump to content

scripting help needed


steve750

Recommended Posts

been trying to get this right for a while getting desperate now. veiwed a working autolock feature for luxurygoodspringshomeand jery rigged it for my needs but just wont save, can get file to save if i only enter a Scn and begin an end any thing else and it wont save so must be doing somethie wrong ppppplease help.

my gate name is TPFrontGateRoad01 ref id 301 and placed activater named Relocker ref id 302

My Script reads

Begin OnTrigger Player

 

TPFrontGateRoad01Ref.lock 301

 

If TPFrontGateRoad01Ref.GetOpenState == 1

TPFrontGateRoad01Ref,SetOpenState 0

endIf

 

End

 

If any one knows where im going wrong please tell me.

Tried swapping to OnActivate and swapping from the gate itself to the activater but nothong seems to work

Link to comment
Share on other sites

been trying to get this right for a while getting desperate now. veiwed a working autolock feature for luxurygoodspringshomeand jery rigged it for my needs but just wont save, can get file to save if i only enter a Scn and begin an end any thing else and it wont save so must be doing somethie wrong ppppplease help.

my gate name is TPFrontGateRoad01 ref id 301 and placed activater named Relocker ref id 302

My Script reads

Begin OnTrigger Player

 

TPFrontGateRoad01Ref.lock 301

 

If TPFrontGateRoad01Ref.GetOpenState == 1

TPFrontGateRoad01Ref,SetOpenState 0

endIf

 

End

 

If any one knows where im going wrong please tell me.

Tried swapping to OnActivate and swapping from the gate itself to the activater but nothong seems to work

well one thing that hits my eye would be the fact you have a , instead of a . in your setopenstate-line...?

...

and one other thing to hit my eye would be the fact we both seem to share the same name vendor... ;-)=)

Edited by stevie70
Link to comment
Share on other sites

My Script reads
Begin OnTrigger Player

TPFrontGateRoad01Ref.lock 301         ; <--- I suppose the number should be between 1 and 255, are you planning to change the lock level? ***

If TPFrontGateRoad01Ref.GetOpenState == 1
TPFrontGateRoad01Ref,SetOpenState 0   ; <--- the point in here actually is a comma
endIf

End

 

 

*** regarding lock level

Link to comment
Share on other sites

thought the number after lock was a ref id in the edit base options was wrong about that then as for the , was just a typo on here was right in my script sorry.

ill change the lock number but i think i already tried that as 255 as that was the number in the script i used as a base but ill try try again, cheers

Link to comment
Share on other sites

Okay, lets check in.

You marked the door, which is TPFrontGateRoad01Ref as persistent?

Then you placed a trigger into the world, also persistent.

 

It's important to use the reference id in the script which is existing and persistent.

 

Best would be you post the actual script.

Link to comment
Share on other sites

would post the script but dont know how wont let me copy and paste. everything is as you said thou my gate name is TPFrontGateRoad01 its not cos im putting ref after it is it thought i had to. havent even got to the point where i can actually add the script to the gate cos it wont let me close the window with out saving and it wont save so must be something wrong
Link to comment
Share on other sites

Copying a script wotks like this:

 

- open the script and place the cursor in

 

- hold [Ctrl] + [A]

(everything is marked)

 

- hit [Ctr] + [C]

(copy is sent to clipboard)

 

- then just paste it here by

[Ctr] + [V]

 

 

Edit:

Yes you need the ref id of the door which has been placed into the world.

You need to give it a name.

Usually, when the base object is called "SomeDoor" the unique object which has been placed into the world usually has not a referance id.

 

You need to give the door a reference id yourself. Just name it "SomeDoorRef" manually.

http://geck.bethsoft.com/index.php/Reference

Edited by tortured Tomato
Link to comment
Share on other sites

ye that was it removed ref from script and gave the gate same ref id to keep it simple all save ok and added the script to the activator both persistant refrence ant linke the gate to the activator via enable parent. and just tested in game but it the gate still doesnt relock aaaaaaaahhhhhhhhhhh
Link to comment
Share on other sites

  • Recently Browsing   0 members

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