Jump to content
ℹ️ Download History temporarily unavailable ×

Error When Calling OnPhaseBegin


c0c0c0

Recommended Posts

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")

endEvent

I 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 4
Copyright © 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

"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 by DieFeM
Link to comment
Share on other sites

  • Recently Browsing   0 members

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