Jump to content

Script errors when editing vanilla quest


Domenicus7

Recommended Posts

I'm trying to make a mod that will have other routes to getting rid of the silver bloods other than what there is in the base game, but I have got stuck at the first hurdle. I;m trying to make a quest state that will be triggered if the player passes a speech check when the guards try to arrest them but I get errors, which is really weird as I haven't touched the other script fragments. Can anyone help? Am I using RegisterForSingleUpdateGameTime wrong? Is this just creation kti weirdness and if so how do I fix it?

 

C:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\QF_MS01GuardAmbushQuest_000210CD.psc(113,0): mismatched input 'Event' expecting ENDFUNCTION
C:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\QF_MS01GuardAmbushQuest_000210CD.psc(119,0): missing EOF at 'EndFunction'
;Player talks the guards down so has two hours to leave markarth

kmyquest.RegisterForSingleUpdateGameTime(2.0) 


Event OnUpdateGameTime()
   Alias_ForcegreetGuard.GetActorReference().SetPlayerResistingArrest()
   Alias_Guard03.GetActorReference().AddtoFaction(PlayerEnemyFaction)
   Alias_Guard06.GetActorReference().AddtoFaction(PlayerEnemyFaction)
   EndEvent

Edited by Domenicus7
Link to comment
Share on other sites

You cannot put events inside of script fragments. Script fragments are special in that they are their own function block rather than a full script.

 

Your best course of action is to add a new script to the quest holding the script fragment. In this script you will have a function that registers for the update and you would have the update event itself. The script fragment would then call the function remotely.

 

Something like:

 

Quest script

ScriptName QuestScript Extends Quest
 
ReferenceAlias Property Alias_ForceGreetGuard Auto
ReferenceAlias Property Alias_Guard03 Auto
ReferenceAlias Property Alias_Guard06 Auto
 
Function RegisterMyStuff(Float WaitTime)
  RegisterForSingleUpdateGameTime(WaitTime)
EndFunction
 
Event OnUpdateGameTime()
  Alias_ForcegreetGuard.GetActorReference().SetPlayerResistingArrest()
  Alias_Guard03.GetActorReference().AddtoFaction(PlayerEnemyFaction)
  Alias_Guard06.GetActorReference().AddtoFaction(PlayerEnemyFaction)
EndEvent

Script fragment

(kmyquest as QuestScript).RegisterMyStuff(WaitTime)

Please note that the above is not tested for functionality or compilation. There may also be other methods to achieve the same thing. Hopefully, others may reply and offer their insight thus allowing you to choose what method works best for your needs.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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