Jump to content

open 2 state activator with terminal using papyrus fragments


falloutfan11

Recommended Posts

You need to make a property for the door you're trying to open and then in your fragment write the following:

YourDoorProperty.SetOpen()

To close it again use the following:

YourDoorProperty.SetOpen(False)


If you want it so the option to open or close only shows up when applicaple you can add the condition GetOpenState to the menu item. the door is open if GetOpenState returns 1 and is closed when it returns 3.

Some extra info on these functions can be found here: GetOpenState, SetOpen

Link to comment
Share on other sites

You need to make a property for the door you're trying to open and then in your fragment write the following:

YourDoorProperty.SetOpen()

To close it again use the following:

YourDoorProperty.SetOpen(False)

 

If you want it so the option to open or close only shows up when applicaple you can add the condition GetOpenState to the menu item. the door is open if GetOpenState returns 1 and is closed when it returns 3.

 

Some extra info on these functions can be found here: GetOpenState, SetOpen

i get this error when attempting to use

ArmoryDoor.SetOpen()

 

Papyrus Compiler Version 2.8.0.4 for Fallout 4
Copyright © ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112"...
C:\Users\Andrew\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_UGBGreenRoomTerminal_03015112.psc(39,11): no viable alternative at input '.'
C:\Users\Andrew\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_UGBGreenRoomTerminal_03015112.psc(66,23): no viable alternative at input 'stage2'
C:\Users\Andrew\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_UGBGreenRoomTerminal_03015112.psc(66,7): Unknown user flag stage2
No output generated for Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112
Link to comment
Share on other sites

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment

Scriptname Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112 Extends Terminal Hidden Const


;BEGIN FRAGMENT Fragment_Terminal_01

Function Fragment_Terminal_01(ObjectReference akTerminalRef)

;BEGIN CODE

Grnlight.enable()

;END CODE

EndFunction

;END FRAGMENT


;BEGIN FRAGMENT Fragment_Terminal_02

Function Fragment_Terminal_02(ObjectReference akTerminalRef)

;BEGIN CODE

Grnlight.disable()

;END CODE

EndFunction

;END FRAGMENT


;BEGIN FRAGMENT Fragment_Terminal_03

Function Fragment_Terminal_03(ObjectReference akTerminalRef)

;BEGIN CODE

NewProperty.enable()

;END CODE

EndFunction

;END FRAGMENT


;BEGIN FRAGMENT Fragment_Terminal_04

Function Fragment_Terminal_04(ObjectReference akTerminalRef)

;BEGIN CODE

NewProperty.Disable()

;END CODE

EndFunction

;END FRAGMENT


;BEGIN FRAGMENT Fragment_Terminal_05

Function Fragment_Terminal_05(ObjectReference akTerminalRef)

;BEGIN CODE

ArmoryDoor.IsOpen(true)

;END CODE

EndFunction

;END FRAGMENT


;BEGIN FRAGMENT Fragment_Terminal_06

Function Fragment_Terminal_06(ObjectReference akTerminalRef)

;BEGIN CODE

ArmoryDoor.playAnimation(Anim)

;END CODE

EndFunction

;END FRAGMENT


;END FRAGMENT CODE - Do not edit anything between this and the begin comment


ObjectReference Property EnableMarkerGreenRoomLights Auto Const


ObjectReference Property Grnlight Auto Const


ObjectReference Property NewProperty Auto Const


ObjectReference Property hiddendoor Auto Const


ObjectReference Property ArmoryDoor Auto Const


String Property activatedoor Auto Const


String Property Anim = stage2 Auto Const

Link to comment
Share on other sites

This script doesn't actually contain the SetOpen(). It looks like there are some leftovers from testing different ways to open the door. Try deleting ArmoryDoor.IsOpen(true) and ArmoryDoor.PlayAnimation(Anim).Save it and then in the fragment window using the SetOpen() again.

Link to comment
Share on other sites

Papyrus Compiler Version 2.8.0.4 for Fallout 4

Copyright © ZeniMax Media. All rights reserved.

Starting 1 compile threads for 1 files...

Compiling "Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112"...

C:\Users\Andrew\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_UGBGreenRoomTerminal_03015112.psc(58,23): no viable alternative at input 'stage2'

C:\Users\Andrew\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_UGBGreenRoomTerminal_03015112.psc(58,7): Unknown user flag stage2

No output generated for Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112, compilation failed.


Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on Fragments:Terminals:TERM_UGBGreenRoomTerminal_03015112



im not sure hway tje stage 2 thing is tho

Link to comment
Share on other sites

  • Recently Browsing   0 members

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