falloutfan11 Posted November 18, 2016 Author Share Posted November 18, 2016 How would i go about deleting that? and i really appreciate the help Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 18, 2016 Share Posted November 18, 2016 (edited) The Stage2 is because of the last property. change it to what I posted earlier or remove that property entirely.Edit: you should be able to delete that by editing the script and deleting it there and saving the script, then hit compile again. Edited November 18, 2016 by LoneRaptor Link to comment Share on other sites More sharing options...
falloutfan11 Posted November 18, 2016 Author Share Posted November 18, 2016 it seems to compile now but it doesn't run the animation in game?(does not Move):( Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 18, 2016 Share Posted November 18, 2016 You did fill the property for the door right? Link to comment Share on other sites More sharing options...
falloutfan11 Posted November 18, 2016 Author Share Posted November 18, 2016 i have the property as a ObjectReferance consr and the value is the doors name Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 18, 2016 Share Posted November 18, 2016 By fill I mean when you click the properties button underneath your fragment then in the list select your door and click edit value then pick reference in render window and double click on your door. Link to comment Share on other sites More sharing options...
falloutfan11 Posted November 18, 2016 Author Share Posted November 18, 2016 Yes i have that done correctly Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 18, 2016 Share Posted November 18, 2016 Then I don't know what could have gone wrong I just did a quick test using an activator instead and using the SetOpen() function works fine here. Can you post the new script again. Link to comment Share on other sites More sharing options...
falloutfan11 Posted November 18, 2016 Author Share Posted November 18, 2016 ;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.SetOpen() ;END CODE EndFunction ;END FRAGMENT ;BEGIN FRAGMENT Fragment_Terminal_06 Function Fragment_Terminal_06(ObjectReference akTerminalRef) ;BEGIN CODE ArmoryDoor.SetOpen(False) ;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 ArmoryDoor Auto Const Link to comment Share on other sites More sharing options...
falloutfan11 Posted November 18, 2016 Author Share Posted November 18, 2016 Heres the script from door Scriptname Default2StateActivator extends ObjectReference Conditional Default{For any activator with standard open/close states.} import debugimport utility Group Required_Propertiesstring property openAnim = "open" auto{Animation to play when opening} string property closeAnim = "close" auto{Animation to play when closing} string property openEvent = "opening" auto{Open event name - waits for this event before considering itself "open"} string property closeEvent = "closing" auto{Close event name - waits for this event before considering itself "closed"}EndGroup Group Optional_Propertiesbool property isOpen = FALSE auto conditional{Set to TRUE ot start open.} bool property doOnce = FALSE auto{Set to TRUE to open/close on first activation only.} bool property shouldSetDefaultState = TRUE auto const{Should this activator use SetDefaultState? Set to False only for Activators with identical open/close events.} string property startOpenAnim = "opened" auto{OnLoad calls this if the object starts in the open state} bool property AllowInterrupt = FALSE auto{Allow interrupts while animation? Default: FALSE} bool property InvertCollision = FALSE auto{Typically this will be False (DEFAULT). The References LinkRef'd Chained with the TwoStateCollisionKeyword will typically be Disabled onOpen, and Enabled on Close. If you want that functionality inverted set this to TRUE}EndGroup Group Autofill_Propertieskeyword property TwoStateCollisionKeyword auto{Keword to link to the collision you want to enable/disable based on this activators opened/closed state.}EndGroup bool property isAnimating = false auto Hidden conditional{Is the activator currently animating from one state to another?} bool property shouldOpenNext = true auto Hidden conditional{Used for SetOpenNoWait. Should we open when the timer fires?} int property myState = 1 auto hidden conditional{true when static or animating 0 == open or opening 1 == closed or closing} EVENT OnLoad()if (shouldSetDefaultState)SetDefaultState()EndIfendEVENT Event OnReset()if (shouldSetDefaultState)SetDefaultState()EndIfEndEvent ;This has to be handled as a function, since OnLoad and OnReset can fire in either order, and we can't handle competing animation calls.Function SetDefaultState()if (isOpen)playAnimationandWait(startOpenAnim, openEvent) if (InvertCollision == FALSE)trace(self + " Disabling Collision")DisableLinkChain(TwoStateCollisionKeyword)elsetrace(self + " Enabling Collision")EnableLinkChain(TwoStateCollisionKeyword)endif myState = 0ElseplayAnimationandWait(closeAnim, closeEvent) if (InvertCollision == FALSE)trace(self + " Enabling Collision")EnableLinkChain(TwoStateCollisionKeyword)elsetrace(self + " Disabling Collision")DisableLinkChain(TwoStateCollisionKeyword)endif myState = 1EndIfEndFunction auto STATE waiting ; waiting to be activatedEVENT onActivate (objectReference triggerRef); Debug.Trace("d2SA RESETS: " + Self + " " + isOpen); switch open state when activatedSetOpen(!isOpen)if (doOnce)gotostate("done")endifendEVENTendState STATE busy; This is the state when I'm busy animatingEVENT onActivate (objectReference triggerRef)if AllowInterrupt == TRUE; send the activation\SetOpen(!isOpen)else; block activationtrace (self + " Busy")endifendEVENTendSTATE STATE doneEVENT onActivate (objectReference triggerRef);Do nothingendEVENTendSTATE function SetOpenNoWait(bool abOpen = true) shouldOpenNext = abOpen StartTimer(0)endFunction event OnTimer(int timerID) SetOpen(shouldOpenNext)endEvent function SetOpen(bool abOpen = true); if busy, wait to finishwhile getState() == "busy"wait(1)endWhile; open/close if necessaryisAnimating = trueif abOpen && !isOpengotoState ("busy")trace(self + " Opening " + openAnim)if AllowInterrupt == TRUE || !Is3DLoaded()playAnimation(openAnim) ; Animate OpenelseplayAnimationandWait(openAnim, openEvent) ; Animate Openendiftrace(self + " Opened") if (InvertCollision == FALSE)trace(self + " Disabling Collision")DisableLinkChain(TwoStateCollisionKeyword)elsetrace(self + " Enabling Collision")EnableLinkChain(TwoStateCollisionKeyword)endif isOpen = truegotoState("waiting")elseif !abOpen && isOpengotoState ("busy")trace(self + " Closing " + closeAnim)if AllowInterrupt == TRUE || !Is3DLoaded()playAnimation(closeAnim)elseplayAnimationandWait(closeAnim, closeEvent) ; Animate Closedendiftrace(self + " Closed") if (InvertCollision == FALSE)trace(self + " Enabling Collision")EnableLinkChain(TwoStateCollisionKeyword)elsetrace(self + " Disabling Collision")DisableLinkChain(TwoStateCollisionKeyword)endif isOpen = falsegotoState("waiting")endifisAnimating = false Link to comment Share on other sites More sharing options...
Recommended Posts