Make prisoner stay in shackles when attacked by player

Post » Mon Feb 10, 2014 3:05 pm

I am making a player home which I want to have torture victims in. I have set up wall shackles with prisoners attached to them via sit packages. I have ticked the ignore combat flags. Now the problem is when I attack a torture victim he falls out of the shackles onto the floor. I have tried adding ignore combat to every AI package in the actor window. I have tried adding the DBTortureVictim Package to the actor, but no matter what I do the torture victim always falls to the floor from his shackles when I attack him. Does anyone know how to fix this?

User avatar
Penny Courture
 
Posts: 3438
Joined: Sat Dec 23, 2006 11:59 pm

Post » Tue Feb 11, 2014 3:20 am

Use SetRestrained()

User avatar
I’m my own
 
Posts: 3344
Joined: Tue Oct 10, 2006 2:55 am

Post » Tue Feb 11, 2014 6:18 am

How exactly would I set that script up? Do you know?

User avatar
Evaa
 
Posts: 3502
Joined: Mon Dec 18, 2006 9:11 am

Post » Mon Feb 10, 2014 11:45 pm

Whenever I need to test a function on an actor I always use Event OnLoad() because I know wont be saving my game.

Scriptname RestrainedScript extends Actor  Event OnLoad()    self.SetRestrained()EndEvent

OnLoad is not reliable for anything else for obvious reasons.

You can certainly use Event OnCellAttach() for a general purpose of keeping them restrained.

Bare in mind, all of them will need this attached.

User avatar
Marguerite Dabrin
 
Posts: 3546
Joined: Tue Mar 20, 2007 11:33 am

Post » Mon Feb 10, 2014 10:43 pm

Thanks I will try using OncellAttach linked to an xmarker

User avatar
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm

Post » Mon Feb 10, 2014 2:44 pm

Had to attach the script to the actor. But works perfect! Thanks again Terra!

User avatar
amhain
 
Posts: 3506
Joined: Sun Jan 07, 2007 12:31 pm

Post » Mon Feb 10, 2014 9:29 pm

In theory attaching it to the xmarker and casting the actors as objectreference should work.

Nah nevermind. Anyway glad it works for you.

User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am


Return to V - Skyrim