Making an actor ignore combat?

Post » Thu Jun 21, 2012 10:48 am

Hey guys, there must be something I'm missing here, as I vaguely remember being able to do something like this in Oblivion.

I have an NPC in a dungeon, who's supposed to be a prisoner, and is shackled to the wall. The problem is, as soon as combat starts, he runs around commenting "ooh, my money's on the big one!" and "I'll find whoever did this!" and all the usual sort of stuff.

Which, obviously, I don't want him to do. He's a member of CaptiveFaction, so I suppose that could have something to do with it, but if I tried making him neutral to anybody in the dungeon, they're going to attack him.

So, what do I do?
User avatar
Yama Pi
 
Posts: 3384
Joined: Wed Apr 18, 2007 3:51 am

Post » Wed Jun 20, 2012 8:22 pm

Did u try to find another prisoner in CK like the one which is delivered from thalmor domain ?
User avatar
Sherry Speakman
 
Posts: 3487
Joined: Fri Oct 20, 2006 1:00 pm

Post » Thu Jun 21, 2012 1:53 am

There is a function called SetRestrained, set that to true for the character.
User avatar
Chris Ellis
 
Posts: 3447
Joined: Thu Jul 26, 2007 10:00 am

Post » Thu Jun 21, 2012 8:15 am

There is a function called SetRestrained, set that to true for the character.

Aha! Thanks. :smile:

EDIT: I seem to have some trouble getting it to work in my quest script (it compiles, it just doesn't seem to do anything). Here's what I have:
Alias_Victim.GetActorReference().MoveTo(Alias_VictimMarker.GetReference())
Alias_Victim.GetActorReference().SetRestrained()
SetObjectiveDisplayed(10)

"Victim" being the NPC I want shackled, and "VictimMarker" being the shackles. The script is intended to run at Stage 10 of my quest, and everything works exactly as intended, except for that SetRestrained function.

As far as I can tell from the wiki, it automatically defaults to "true". Do I need to manually type it?
User avatar
Marcin Tomkow
 
Posts: 3399
Joined: Sun Aug 05, 2007 12:31 pm


Return to V - Skyrim