Jump to content

[LE] Two Basic Questions About NPCs


Recommended Posts

1. I am looking to have a NPC attack the player if they pick a certain dialogue option. What should I do to make this happen (What script should I write on the dialogue end box? Do I need to make a package?) ? I've been looking online for a while but I haven't found a direct answer.

 

2. I am trying to enable a NPC called Dar'valzir once the quest reaches stage 30. It wasn't working, even though I was able to activate other NPCs using the exact same process (with only the alias name differing), so it's not a syntax error. The quest does advance to stage 30, as the logs change, the correct objectives appear and complete, etc., but whatever I do Dar'valzir will not spawn. I even plopped the same actor down in 3 different locations, created different aliases for each one, and put the script to activate them in different stages of the quest, but nothing seems to work. I think it's a problem with the actor itself... anyone know what to do?

 

Thanks

Link to comment
Share on other sites

As far as making NPCs hostile there is the quest with the Old Orc who wants to die an honorable death. I don't remember the name, but that may be helpful for you. I've been able to force it by creating a custom faction that is hostile to the NPC and adding the player to that faction at the end of the dialog. That method is hit-and-miss though.

 

As for #2 I'm not sure how to help you. You can check the use info and make sure that the NPC is actually being used by the quest in question and no other quests. It's possible that your attempt to enable him is being interfered with somehow. If all of that doesn't work, you can create an x marker and use the x marker as the enable parent for the NPC. Enable the x marker instead of the NPC in your quest and that make work around whatever issue you are having. You can probably just change the alias reference to the x marker.

Link to comment
Share on other sites

For the first have the NPC be in a custom faction then in the dialogue set that faction to be an enemy of the player faction.

I have this as the script, but it's not doing anything. The NPC is a member of HoDForvarsFaction, and the faction property is set on the script.

HoDForvarsFaction.SetPlayerEnemy()

Not sure what I'm doing wrong.

Link to comment
Share on other sites

Turns out the NPC was set to Unagressive, changed it to Aggressive and it works just fine.

 

Still can't get Dar'valzir to activate, though. He works fine when he isn't set as "initially disabled", but it seems the enable script just won't work on him for whatever reason. I even tried creating a duplicate NPC, but to no avail...

 

If all of that doesn't work, you can create an x marker and use the x marker as the enable parent for the NPC. Enable the x marker instead of the NPC in your quest and that make work around whatever issue you are having. You can probably just change the alias reference to the x marker.

Mind describing that process in greater detail (what specific scripts I should use?)

 

EDIT:

 

Worked around this by creating a holding cell for my NPC. Then, on the specific quest stage's script, created a actor property for my unique NPC and an objectreference property for a xmarkerheading that I placed where I wanted the NPC to teleport. The script you have to write is Actorname.moveto(Xmarkerobjectreference)

Edited by Kagedomo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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