On963 Posted September 25, 2016 Share Posted September 25, 2016 Does anyone know What I am doing Wrong. Script===============================================================Scriptname Enclavequest001 extends ObjectReference Const Quest Property Enclave001 auto const Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)if akNewContainer == Game.GetPlayer() Enclave001.SetStage(20)endIfendEvent=============================================================== Output===============================================================Papyrus Compiler Version 2.8.0.4 for Fallout 4Copyright © ZeniMax Media. All rights reserved.Starting 1 compile threads for 1 files...Compiling "Enclavequest001"...C:\Users\On963\AppData\Local\Temp\PapyrusTemp\Enclavequest001.psc(6,38): required (...)+ loop did not match anything at input 'Enclave001'No output generated for Enclavequest001, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. =============================================================== Link to comment Share on other sites More sharing options...
scrivener07 Posted September 25, 2016 Share Posted September 25, 2016 I think each statement needs to be on its own line. Scriptname Enclavequest001 extends ObjectReference Const Quest Property Enclave001 Auto Const Mandatory Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (Game.GetPlayer() == akNewContainer) Enclave001.SetStage(20) endIf endEvent Link to comment Share on other sites More sharing options...
LoneRaptor Posted September 25, 2016 Share Posted September 25, 2016 Your comparing a container (akNewcontainer) to a quest stage (Enclave001). If you want to set a stage when an item changes containers then you shoud compare the akNewContainer with a Objectreference property for your container.For example:ObjectReference Property YourContainer Auto Quest Property Enclave001 Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If akNewContianer == YourContainer Enclave001.SetStage(20) EndIf EndEvent Edit: Scrivener07's script will also work if you want to set the stage when the item gets moved to the players inventory. Link to comment Share on other sites More sharing options...
FiftyTifty Posted September 25, 2016 Share Posted September 25, 2016 Game.GetPlayer() is slow and bad and shouldn't ever be used. Just create an actor reference that points to the player instead. 'Tis good practice tae use a playerref property, anywho. Link to comment Share on other sites More sharing options...
EveningTide Posted September 26, 2016 Share Posted September 26, 2016 Game.GetPlayer() is fine in every situation where you would only call it once, like all the Getxxx functions out there, including GetReference() (by assigning it to ObjectReference or Actor, depending on the type), but even then there is a way to efficiently use that by assigning it to an actor variable and using that variable throughout. But yeah, it's exactly 1000 times slower than the actor property. Link to comment Share on other sites More sharing options...
Recommended Posts