Jump to content

[LE] Disable NPC/Actor


Recommended Posts

Well, that depends immensely on how you've set your quest and your updates up. First of all, make sure that 1) the update event is being run using a debug function, and that 2) your stage is succesfully set to 30 using console command SQV.

Edited by wormple12
Link to comment
Share on other sites

Stage is set to 30. I know because I get message to perform another task.

 

I use "Flee To" package before this script. My NPC should run to some place and then disappear after 10 seconds. But this package shouldn't be a problem.

Link to comment
Share on other sites

Well obviously it doesn't work because my NPC is still there.

 

It's a quest where i search for some people, and at the certain point this NPC forcegreets and warns me to leave and stop searching for them. Then after this stage he should flee from me and disappear, i must disable him.

Later in the quest he's gonna be enabled again, but that's not important now.

 

I use OnUpdate() event in the Reference window, like this:

 

 

Scriptname MyNPCDisableScript extends ObjectReference

Event OnUpdate()
If MyQuest.GetStage() == 30
Utility.Wait(10.0)
MyNPC.Disable(True)
EndIf
EndEvent
Quest Property MyQuest Auto
Actor Property MyNPC Auto

Link to comment
Share on other sites

If you never register your npc for updates, the OnUpdate event will not run...

 

It sounds like you shouldn't use OnUpdate at all, but rather use utility.wait in your stage 30 script fragment -- or even better, run a script in your package when it completes (if Flee packages ever complete, you can figure that out on the wiki too, probably).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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