Jump to content

Making Actors Essential/Non-Essential with Papyrus


Recommended Posts

I'm way behind on making quests in Bethesda games, haven't done anything with it since Oblivion. I'm trying to set up a script to make characters that are normally essential during a quest non-essential, and then I plan to add a simple alternative way to complete the quest if they die. What I don't understand is how to make the papyrus script read a quest stage, then activate the script based on it. I understand what some pieces of papyrus code do, to some extent, but not how to put them together.

 

So, here, in non-code.

 

Get quest stage for MQ102

If quest stage = 60 then make actor 19fd9 (and others) non-essential

 

Then I need to make so if all those characters are dead a quest prompt pops up and tells you to search the bodies. From my understanding this is done through aliases in the CK. Then I'd do one more script similar to the tutorial one, which is,

 

Scriptname MyTriggerBoxScript extends ObjectReference

Quest Property MyQuest Auto
Int Property StageToSet Auto

Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
MyQuest.SetStage(StageToSet)
EndIf

EndEvent

 

to make the quest stage advance when a certain object is picked up by the player.

 

So, how do I call a certain quest? Do I reference it in the script somehow, or do I just attach a generic script for any quest to that specific quest in the CK? Same with the actors, do I reference them directly in the script, or can I write a generic one and somehow make it run on them individually? Do I even need the quest part? Do I have it extend a quest or an actor, or what? Can I just make a script that extends an actor and says if MQ102 stage is 60 or higher then make this actor non-essential, and then attach it to each of them? I feel completely lost.

 

Link to comment
Share on other sites

SetEssential

 

Scripting has slightly changed from the Skyrim days but not much. It just took me about 20 minutes to look everything up with F4 scripting since most of it was kept intact from Skyrim.

 

As for from Oblivion...I haven't modded from then so I don't know how different Skyrim and Oblivion coding is from eachother. To call this function from a quest stage is simple, just put this function on the stage itself and then add your SetStage to whatever you need. That is the proper function though the Properties are written differently; they are now written like this for F4:

 

Quest Property MyQuest Auto Const

Int Property StageToSet Auto Const

Link to comment
Share on other sites

  • Recently Browsing   0 members

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