c0c0c0 Posted April 4, 2021 Share Posted April 4, 2021 I am attempting to attach a scripted action to the end of every phase of a scene. As a test, I am using the sample code directly from the Papyrus documentation: Event OnPhaseBegin( Scene akSender, Int auiPhaseIndex ) Debug.Trace("Scene phase " + auiPhaseIndex + " has just started") endEventI am putting this in the fragment box on the Scene tab," Edit Data", "On End." When I comp[ile, I get: Papyrus Compiler Version 2.8.0.4 for Fallout 4Copyright © ZeniMax Media. All rights reserved.Starting 1 compile threads for 1 files...Compiling "Fragments:Scenes:SF_WRARQuestScene_0100080C"...C:\Users\c0c0c0\AppData\Local\Temp\PapyrusTemp\Fragments\Scenes\SF_WRARQuestScene_0100080C.psc(7,0): no viable alternative at input 'Event'No output generated for Fragments:Scenes:SF_WRARQuestScene_0100080C, compilation failed. Any ideas what I'm doing wrong? Is this the wrong place to put that? Do I need to define a certain "property"? Link to comment Share on other sites More sharing options...
DieFeM Posted April 4, 2021 Share Posted April 4, 2021 (edited) "On End" is a fragment, a fragment is a function, an event can not be declared inside of a function, therefore an event can't be declared in a fragment. You would need to attach a script ("Add" button at top right in "Edit Data", then "new script"), there you can use any scene event you wish. Edited April 4, 2021 by DieFeM Link to comment Share on other sites More sharing options...
c0c0c0 Posted April 5, 2021 Author Share Posted April 5, 2021 "On End" is a fragment...I was trying to attach an event to an event. Makes perfect sense. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts