Jump to content

Working noose - proof of concept


Recommended Posts

Working noose - proof of concept

View File

 

Important notes to please pay attention to before installing 6.0.1

 

1. this mod is meant to be used with extensive console use, it is not “plug and play” and is not very user-friendly; please do not try to use unless you are familiar with the console and you are willing to put in some effort (sometimes) for things to look and work right

 

(if the codes listed for the items below don't mean anything to you, then you should not install this version)

 

2. if you have any previous versions of this mod, the new version will erase the previously placed furnitures because the form ids changed; don’t install if you want to keep already placed nooses and furniture

 

3. for convenience in commanding NPCs (placing them in setcommandstate mode), I highly suggest FO4 hotkeys https://www.nexusmods.com/fallout4/mods/11664

 

(I am attaching my own hotkeys.ini file, either rename “SAC Hotkeys.ini” to “Hotkeys.ini”, or copy/paste my commands to your keys of choice – I mapped F1 to getting a NPC into commandstate and F2 to release them)

 

4. all the furnitures in this mod will kill the NPCs, including essential ones (it will kill Preston); don’t hang NPCs that you don’t mean to die, or be prepared to reload

 

5. the placed furniture / nooses usually needs some position alignment

 

(I am using Autohotkey object mover https://www.nexusmods.com/fallout4/mods/24773)

 

6. all the objects must be obtained or placed via console, there is no constructible object, recipes or similar

 

Main new features of this new release:

 

-          It will play a random mix of Grayuser’s hanging animations, mixing and switching the animations mid-scene

-          The furnitures are no longer constructible, just use the weapons provided as directed or spawn them from console

-          It will place random hands and/or feet restraints which persist after death (they will look weird sometimes)

-          There are a number of facial expressions for the hanged NPCs, AAF is required to this to work

-          Streamlined the scripts a lot behind the scenes

-          Allows for many NPCs to be hanged simultaneously

-          The player can now hang themselves (sort of, in fact it will hang a doppelganger of the player, otherwise the camera just doesn’t work, AAF is needed for doppelganging to work)

-          Other stuff I’ve probably forgotten

 

Contains:

 

Scripted furniture (scripted = when NPC sits in furniture, the hanging starts automatically); use console PT to spawn the furniture

 

Gallows T scripted, 2 “seats” (28EAF)

Gallows TT scripted, 4 “seats” (28EB1)

Gallows Beam scripted (28EB2)

Hanging Pole (BE4D7)

Hanging Pole straight (BE4D9)

Hanging Plain (DBE93)

 

Use cases for the scripted furniture:

 

Setcommandstate the NPC, direct them to “sit furniture”, or

Shoot the NPC with the Noose IDLE gun, the IDLE gun will snap the NPC into the nearest furniture (either noose or gallows) – make sure you have previously directed them nearest to the furniture / noose you mean to use

 

Unscripted furniture (unscripted = the NPC will kneel and wait to be hanged later with the Hanging Gun) – this is useful for simultaneous hangings

 

Gallows T noscript (28EB5)

Gallows TT noscript (28EB4)

Gallows Beam noscript (28EB3)

Gallows with 3 nooses (BAFA4)

Gallows with 4 nooses (4F5DB)

 

Use cases for the unscripted furniture:

 

Setcommandstate the NPC, direct them to “sit furniture”, then shoot them with the Hanging Gun – it will spawn a noose and hang the NPC, or

Shoot the NPC with Hanging gun IDLE, they will kneel into the furniture, then shoot them with the Hanging Gun to hang them

 

Weapons:

 

Hanging Gun (58BF4) – spawns a short noose at the NPC location, hangs the NPC

 

Hanging Gun IDLE (AC438) – snaps the NPC into the nearest gallow seat (if the gallow is scripted then they will kill the NPC automatically, if the gallow is not scripted the NPC will kneel and wait) or noose (all nooses are scripted)

 

Hanging Gun Furn (150359) – will spawn a scripted furniture at the NPC location and hang the NPC

 

Noose arrow (10358B) – is a grenade that flies in straight line and spawns a long noose on contact with any surface; aim it at a beam or tree branch, fire like any grenade (straight line!), and you get a working noose

 

(sometimes the tree braches have no collision for the “arrow” to impact into, so the “arrow” will fly into the sky and spawn a noose very high up; be prepared to TCL, fly near the noose and delete it in console)

 

Noose arrow exec (8B283) – same as the noose arrow, but spawns a type of noose that doesn’t kill the NPC, rather they will animate indefinitely (until you kill them somehow else, like with a bullet, then they will hang dead)

 

 

 

Absolute requirements: F4SE, AAF

 

Version 5.0+ requires Gray User's Bad Ends Animations ; his NSWF pack is recommended if you want sound during the animation phase

 

I really do recomment installing FO4 Hotkeys and assign one hotkey (I use F1) to the command "pna; setcommandstate 1" (this will enable you to command any NPC just by pointing at them and pressing F1)

 

Place Everywhere is highly recommended

 

An autohotkey manager for object manipulation (like this one) is highly recommended, to position the nooses freely outside workshop areas

 

 

 

Credits

 

- ag12 for his invaluable help in setting up the script, thank you!
- Oakern, for his awesome CRX mod, which is a must-have for me (hopes he keeps adding content to it), for providing the inspiration and for giving me permission to use his assets (which I did)
- Vader666, from whom I took the hands-bound animation and helped me figure out how to add animations to furniture (thank you!), check out his Torture Devices mod
- LazyGirl, check out her Abduction mod
- steve40 for giving me permission to use his dirt shader from CWSS
- Crimsomrider, for giving me permission to distribute my modded versions of his outfits

- Gray User for his hanging animations
- others who kindly helped me at various stages along the way

 

Permissions

 

Use it - and hopefully improve upon it - in any way you want, but please let me know in a comment or PM if you managed to create a better version, so I can enjoy it myself. This is the reason why I uploaded it under modder's resouce.

 

I cannot speak for the assets I took from Vader666, Crazy, steve40 and Crimsomrider - those assets belong to them.

 

Future plans

 

- A flexible rope for the noose - help needed

- More animations - help needed

 

Disclaimer

 

This is my first scripted mod ever. It may break your save, your game, or your life (shouldn't, really, unless it's already fucked up) - I take no responsibility. The scripts are not tested for performance or for persistence. If you get bloated saves, or bloated Papyrus logs, or orphan scripts, or whatever, sorry, I don't really know what I'm doing, so use this mod(der's resource) on your own responsibility.

 

Detailed change log (please take the time to read this)

 

 

 

[v4.61 comment]

 

Please note that F4SE is a hard requirement, scripts will not run correctly without it

Cleaned up the mod description

 

[/v4.61 comment]

 

 

[v4.61 bugfix]

 

- fixed a significant havok bug
- if you downloaded v4.6, please download 4.61 and replace all
- if you haven't downloaded 4.6 yet, then you are fine, you can install 4.61, the link to the bugged 4.6 has been removed

 

https://mega.nz/#!E6ogxA6Y!n_X3i7sE2x1CKNk_i8_AehYpq4LGfv8PGMLTJnjtcmY

 

[/v4.61 bugfix]

 

[v4.6 update]

 

- adds the "Noose Arrow" - a "grenade"-type "weapon" which places a long noose furniture upon contact; behaves like a bullet, flies in straight line, but has to be "launched" as a grenade
- the "noose arrow" id is xx810358b (player.additem xx810358b 100)
- the "noose arrow" is useful to place nooses on high spots, especially outside settlements - shoot the arrow at the target object (a tree, for example), tweak the position using FO4 autohotkey positioning, then command the NPC to "snapintointeraction"; I'll upload a tutorial in the support thread

 

- tweaks the convulsing havok yet again... hopefully with more consistent results; factored in the NPC mass

 

- adds random collision objects around the hanged NPC's neck/head, which force the hanged NPC to twist the neck into random positions for a more "diverse look" - I am still tweaking this, it's a recent addition, so it may lead to weird positions or NPCs being forced out of the noose

 

- there are now approx 30 different hanging outfits, feet pointing down, mostly female versions

 

- due to the outfits, the file is now over 100MB, meaning LL will not accept the upload - I am uploading a txt file with a link to mega, and will be posting the mega link here as well; this is the first time I'm using mega for uploads, let me know if it doesn't work

 

https://mega.nz/#!E6ogxA6Y!n_X3i7sE2x1CKNk_i8_AehYpq4LGfv8PGMLTJnjtcmY

 

[/4.6 update]

 

[4.5 beta update]

 

- removed DLC dependencies, hopefully that will work
- new ESP name, the new name is "noose - distribution.esp" (take care which esp you install and activate)
- adds about 20 outfits, feet pointing down, to be equipped by the victims - victims will have a 50% chance to equip a random noose outfit
- each outfit's feet position has been modified by hand, individually - meaning there can be glitches, meaning some will look better than others, depending on my current disposition when modifying said outfit
- outfits are EVB-based - meaning that, if you have CBBE, the outfit textures will be messed up
- a lot of the outfits are modified Crimsomrider assets, used with permission -
check out and endorse his awesome work, and if he has anything to object to the current version of the mod, then I will take that version down
- adds the usual furniture script to the craftable long noose
- if your victims get invisible bodies, that means I fucked up the packaging, let me know

 

[/4.5 beta update]

 

[v4.1 update]

 

- This version requires all DLC plus Armorsmith Extended. Sorry.
- The Hanging Gun IDLE (additem xx0AC438 or help hanging 4 weap) now has an functioning script - once you already hanged a victim, you can use it to re-animate the kick/swing sequence. It also has a 10% chance to equip one of the proof-of-concept hanging outfits (more details below)
- A couple of additional furnitures, most useful of which is a long noose. This one does not have a script attached, you direct the NPC to sit the furniture then kill it "manually" (or by using the Hanging Gun IDLE, which kills and kicks/swings an already placed victim)
- A couple of proof-of-concept hanging outfits, with the feet pointing down, instead of staying horizontal - see screenshot, the body on the left has the feet in the vanilla position (horizontal/forwards), the one on the right is a modified outfit, with feet pointing down

 

The included hanging outfits are the female nude body, and the female Letterman jacket red. There are male counterparts, so, if used on a male, the body doesn't disappear, but they are unmodded.

 

Unless I find a smart way to manage the various outfits, or I discover a new feature that I think would be useful for the community, this will likely be the final public version. Reason is that I am going to modify and integrate additional outfits, but I do not own those assets, so I cannot distribute modified versions of those. And maintaining two parallel forks is not something that I can deal with.

 

[/v4.1 update]

 

[v4.0beta1]

 

- unified script between the hanging gun and all the furniture - this is not visible to the user, but very important for me, makes rolling out future updates a hell of a lot easier

 

- the script is now property-driven - you can change a lot of script behaviors via FO4Edit. See the properties screenshot and the details below. Please note that there is a consistent piece of logic embedded into the script, trying to make sure that the properties, and their effects, remain consistent and realistic

 

- the script is now a lot more modular, again making maintenance easier

 

(these three features are the reason why I consider this a major release, hence 4.0)

 

- introducing a new 3-seat, craftable gallows furniture - you can direct up to 3 NPCs to "sit" into the gallows (they will kneel and wait), then shoot them with the hanging gun for a simultaneous execution; see screenshots

 

- introducing neck-snapping and thrashing on kill

 

- new choking sounds, hopefully more realistic

 

- various tweaks, positioning and otherwise

 

The editable properties are:

 

- allowfeetrestraint = whether to place a feet restraint on kill
- allowhandsrestraint = places a hands restraint; currently disabled on all furnitures
- allownecksnap = neck-snapping on kill, currently enabled on all furnitures
- allowprop = places / disables the chair
- allowreversenoose = self-explanatory
- allowrotatingnoose = rotates, or not, the noose after kill
- isgarrotte = whether the furniture is a garrotte
- isnoose = whether the furniture is a crafted noose
- ispole = whether the furniture is a hanging pole

 

[/v4.0beta1]

 

[update v3.7beta1]

 

- new swing / rotate mechanics to animate the noose, and the victim, after hanging - not quite like havok, but getting there
- new stage 2 (kill / strangle stage), now using ragdoll instead of lame vanilla animations (at least until I get some sort of decent animation)
- introducing the most immersive garrotte shithouse
- introducing strangle (during stage 2) and rope swing (ad infinitum) sounds
- the furniture nooses can be positioned freely in the air - no idea why they were snapping to the ground earlier, it just fixed itself
- the hanged people now get a dirt shader effect, courtesy of CWSS (with permission)
- various internal tweaks to make hanged people hang better and more reliably

 

Beta - because of limited testing, and one known issue with the noose furnitures not positioning the victim properly during stage 1 (pleading) - but they still hang them high properly, so use with confidence

 

[/update v3.7beta1]

 

[version 3.6]

 

- there is a 50% chance of hanging the victim by a reversed noose during the kill stage (reversed = victim facing the knot)
- during the first phase (pleading), the victim will speak some lines - to be expanded (not working for unique NPCs)
- the hanging gun has a 30% chance of equipping the victim with a sack hood
- added two more furnitures: an angled hanging pole, and a vertical hanging pole - direct the victim to "sit" furniture
(the vertical hanging pole has a 50% chance of restraining the victim's feet on kill)
- unified all noose furnitures under one single, random workshop noose furniture => upon placement, it spawns a randomly-animated noose
- various timing, probability and positioning tweaks (e.g. the chair prop now positions correctly for non-standard NPC scales)
- added two screenshots showcasing the new furnitures, and the reverse knot

 

[/version 3.6]

 

[3.5 bugfix1]

 

- The hanging gun sets the NPC unconscious, to minimize (eliminate?) sandbox breaking the animation. Downside = NPC closes eyes.
- Added a condition to check if the NPC slipped out of the noose upon death, and cancels the kicks/swings if so

 

[/3.5 bugfix1]

 

[3.5 update]

 

Rebuilt all over again...

 

The hanging gun triggers a sequence of 5 stages

 

- stage 1 "pleading" (pleading dialogues not working yet :) ) started working since v3.6beta - random animation from a pool of 8 animations
- stage 2 "hanging" (has some gag noises) - random animation from a subpool of 6 animations
- stage 3 "kill" (positioning should be reliable, unless the NPC has a very non-standard scale)
- stage 4 "kicks"
- stage 5 "swing" (this one is almost infinite, no idea how this will spam the papyrus engine)

 

Problem with the hanging gun is that the NPC tends to sandbox away randomly during the sequence. Until I figure out how to cancel the sandbox, the NPC might snap out of the furniture. The script will quickly snap it back in place, but it's "un-immersive".

 

To minimize this, I suggest not shooting NPCs while they perform tasks or sandbox, but rather first direct the NPC to the place you want them to hang, then shoot them when they arrive there.

 

Until I figure out how to cancel the sandbox, the NPC will be placed in an unconscious state - the only downside it that the eyes are closed.

 

The hanging furniture

 

The same 8 animations have a corresponding noose furniture (noose01 .. noose08), available in the "Special" workshop menu.

 

You need to direct the NPC to "sit" furniture - I also tried making them workshop work objects, so you can assign settlers, but it's unreliable, so I eliminated this option for now.

 

The furniture needs to be built in god mode.

 

I'm not sure where I lost the ability to place the furniture anywhere, but now it only snaps to ground. However, as a workaround, there is a script which fires upon placing the furniture, which raises the noose up 130 .. 140 (random) and rotates it in a random position (to have some variety). This height enables placing the noose high enough for the NPC to fit under (otherwise the NPC cannot "sit") and the noose fits relatively well in the gallows (not really, but acceptable for now).

 

You can modpos z the furniture up in the air however high you please, the NPC will stand under it and then raise automatically to fit the noose. I tried +200, no issues.

 

The old furniture (standing version) is no longer accessible in the workshop menu, in order not to spam the menu. However, the actual FURN objects are still there, in order not to break pre-existing 3.0... arrangements.

 

General observation: don't worry if various animations move the neck away from the noose. The kill stage will snap the neck into the correct position.

 

Props

 

For variety:

 

- there is a 50 percent chance that the chair will be removed upon the NPC's death
- there is a 50 percent chance the NPCs hands will be bound upon death - the bound has collision, and the hands should stay inside pretty reliably, unless you ragdoll the NPC excessively
- the duration of the various stages is random (within some limits)

 

Caution: all the nooses are lethal (hanging gun, and furniture)

 

Caution: the mod packaging is incredibly messy (all sorts of old script versions, unused nifs I experimented with...) and includes animation metadata from a variety of mods, because I don't know how to identify which ones are specific to this mod :) (I have several animation mods installed). It shouldn't break anything, but I would advise backing up your existing meshes folder before installing (or, at least, meshes\AnimTextData, if it exists in your installation)

 

... And I really hope I haven't forgotten to package something in the archive. I don't really have a "clean" environment to test the packaging.

 

Added some comments in the description below, please re-read it.

 

[/end 3.5 update]

 

[3.0 update]

 

Added a hanging gun - you need to acquire it via console, player.additem xx058BF4, where xx is the load order for noose.esp
The hanging gun framework supports changing animations mid-scene => I need a proper hanging animation (!!)
The hanging gun is non-aggro, fire at will, even in settlements
The furniture is no longer replacing the airplane seats, but is standalone; you can build it from the Special workshop menu
2 standing nooses (1 lethal, 1 just posing), 2 kneeling nooses (1 lethal, 1 just posing)
Eliminated the non-PC condition on furniture => hang yourself (i.e. your character) at will, who am I to judge
Added a basic gallows prop, also in the Special workshop category
Added gagging sounds to the Hanging Gun script - kinda lame, will look further for better sounds
The hanging gun script should (theoretically) take care of non-standard actor heights; modpos z may still be needed
Please make sure you look up the disclaimer section

 

[/end 3.0 update]

 


  • Submitter
    SAC
  • Submitted
    04/26/2017
  • Category
  • Requires
    F4SE, AAF, Gray User's "Bad Ends" animation pack + NSFW sounds pack

 

Link to comment

Please add in a trap door thing beneath it and add in some furniture such as ladder & some small round & square chairs below.

And how about some option to set the knot placement from the default back of the neck to the front or the left or right sides of the jaw?

 

Link to comment

If I embed any sort of chair, you won't be able to scrap or move the chair independently of the noose, after the NPC is dead. The chair and noose will form an unified object. Not good.

 

You can rotate / position the NPC in any direction you want, relative to the noose. Console MODANGLE Z nn.

Link to comment

where does the file go?

This is a modder's resource, so far, not a proper mod. It lacks severely in terms of usability. I haven't created an esp to make it buildable, my focus so far is on the model itself.

 

Hence you need to replace an existing model, either vanilla, or one of your installed mods.

 

What I did, personally, was to install the _excellent_ CRX mod and replace \meshes\CRX\skull01.nif with this model (renamed skull01.nif, obviously). After that, it will just replace the cross skull with the noose in CRX's workshop build menu, and then you can build it.

 

You can replace any other mesh from any other workshop mod, the above was just my own method to quick and dirty place it into the world.

 

Next step I want to try is to add a furniture marker. That would simplify significantly the NPC positioning (option 2).

Link to comment

Added an esp version (the zip file) with the noose as usable furniture (it's a replacer for the vanilla 1p airplane seat). Updated "method 1" in the file description for directions for use.

 

Does anyone know how I can add damage to furniture, so the NPC gets killed automatically?

Link to comment

 

Thanks :) if only it were so easy

 

That seems to be the menu for creating items (weapons, clothes etc), not furniture. The furniture menu is different.

 

The main problem is that behind all the properties there are hundreds of possible combinations of properties, values, effects and so on. For example, there are hundreds of pkKeywords that have all sorts of effects - some are applicable, most aren't. It's a needle in a haystack unless you really know what you're doing. And I don't :)

Link to comment

Well, can a health-deaceasibg effect be added to furniture like minus 100 health for 5 minutes?

That is what I am trying to do, but don't know how to. The only furniture I know that generate damage are the Workshop Crosses, and they do it by scripting. I am looking into alternate solutions.

Link to comment

WOk, I am no scripter, but I can think about radiation effect on furniture

 

 

:)

 

https://community.bethesda.net/thread/55815?start=0&tstart=0

 

The radioactive barrels are not radioactive themselves. The barrels themselves are benign, and the radiation is added to the area around the barrel, in GECK. Hence, you cannot build a radioactive barrel (or noose) without altering each individual placement area in GECK.

 

I'll try the script option, or maybe someone will pitch in. 

 

An animation would certainly be nice... but no idea how to do that. There was an animation made for Skyrim (by manoose), but no idea how to port it, or about the permissions to port it.

Link to comment
Scriptname SACscrFurnitureKill extends ObjectReference

event OnInit()
; Blocking the activation, so that the player doesnt accidentally hang himself
BlockActivation(true)
endEvent

event OnActivation(ObjectReference akRef)
; OnActivation block runs even on objects with BlockActivation(true), so the following checks if its NOT the player activating.
if akRef != Game.GetPlayer()
; We know its not the player, so force the actor to bypass the BlockActivation(true) state and activate (sit) in the furniture anyway
activate(akRef, true)
; Wait 1 second to let the actor enter the furniture (adjust to however long your entry animation takes + a small buffer)
utility.sleep(1)
; Kill the actor
akRef.Kill()
endif
endEvent
As for the whole swinging part, maybe if you apply some mild physics force, that'll do it? Also, it might be worth putting in a periodic check after usage to see if the body is still dangling or has been removed/despawned. The script above is the bare-bones version, theoretically you could hang the next actor while the noose is still 'occupied'.
Link to comment

As for the whole swinging part, maybe if you apply some mild physics force, that'll do it? Also, it might be worth putting in a periodic check after usage to see if the body is still dangling or has been removed/despawned. The script above is the bare-bones version, theoretically you could hang the next actor while the noose is still 'occupied'.

Wow! Nice, thank you!! It is a terrific starting point, just what I needed!

 

I suppose I need to compile it and then attach it to the furniture in GECK, right?

 

I would modify one thing: not kill instantly, but damage progressively. I'll have a look at the crosses script, they do that. And I'll try to assign a different idle, I'll look into that too.

 

I don't know how to apply force to the noose. In theory, it does have a swinging animation from the meat bags, it plays in nifskope just fine, but not in game :(

Link to comment

I asked on reddit and 

 

 

You want the player to take radiation when they are near a piece of furniture like a radiation barrel? Just place a radiation Hazard near it/around it. Hazards are under Special Effect in the Creation Kit.

 

Link to comment

Load your mod in the CK, then go to World Objects -> Furniture -> Your Noose Furniture. Open it up and on the left there is a section for Papyrus scripts. Click 'Add', then choose to create a new script. Give it a name of your choosing and then paste my code. Make sure that the first line of code, where it says Scriptname, corresponds to whatever name you choose to give it. Now the script should be added to the Base Object and all instances of it placed in the world will inherit it.

 

Sadly, I can't help with the swing on the noose. I was thinking about applying mild physics force to the body to make it swing a little, but now that I'm thinking about it, that would look stupid if the noose is rigid.

 

Damage over time is difficult in this scenario, since you need the actor to be dead in order to have the ragdoll play. Well, I guess there is work-arounds, but they are way more complicated than this and while definitely doable, they would involve having timers, loops and states for the actor. Also, nooses tend to kill people quite quickly. Depending on whether you pull them up or drop them...

 

@Clegane: That option only does it for instances of the object placed in the CK. If you place it dynamically in the game using the workshop menu, you'd have to use a script to place the radiation source OnInit. However, if you run a script on it, you might as well skip the radiation source and just script the whole thing.

Link to comment

Load your mod in the CK, then go to World Objects -> Furniture -> Your Noose Furniture. Open it up and on the left there is a section for Papyrus scripts. Click 'Add', then choose to create a new script. Give it a name of your choosing and then paste my code. Make sure that the first line of code, where it says Scriptname, corresponds to whatever name you choose to give it. Now the script should be added to the Base Object and all instances of it placed in the world will inherit it.

 

 

 

The script does not fire (start). Should I add any script properties? Because it prompted me to do so, and I didn't know what to put in.

 

Attaching the esp.

 

Thanks!

 

Noose.esp

Link to comment

Voila. I did not do anything but attach the script and distribute it. You need to distribute your scripts like you would the .esp. Also, ignore the script above. I was being retarded. a) it's OnActivate() and not OnActivation() and B) .kill() only works on actors. In this scenario it's just an ObjectReference being handed down.

noose with script.rar

Link to comment

Voila. I did not do anything but attach the script and distribute it. You need to distribute your scripts like you would the .esp. Also, ignore the script above. I was being retarded. a) it's OnActivate() and not OnActivation() and B) .kill() only works on actors. In this scenario it's just an ObjectReference being handed down.

 

Thanks a lot! I'll be able to test it later today :)

Link to comment

Voila. I did not do anything but attach the script and distribute it. You need to distribute your scripts like you would the .esp. Also, ignore the script above. I was being retarded. a) it's OnActivate() and not OnActivation() and B) .kill() only works on actors. In this scenario it's just an ObjectReference being handed down.

 

I can't get it to work. The NPC just turns around trying to get into the furniture, but they never finish the animation / placement. Granted, health does get to zero (but they don't die, they are protected settlers - how do I unprotect them?), so the script indeed fires, but they don't get in the position they need to get to.

Link to comment

Put in a longer grace period, increase the wait between activate() and sethealth.

https://www.creationkit.com/fallout4/index.php?title=ObjectReference_Script

 

You're going to have to use stuff like SetEssential(false), etc. Check out the creationkit wiki for information and tutorials.

 

So - the script works just fine, I checked for restraining and faction removal, and, if I uncomment the kill command, then that works too.

 

Problem is that the animation doesn't play, the NPC tries to jump into the noose a couple of times, then it just stands around restrained.

 

If, on the other hand, I remove the script, then the animation plays fine - but no kill script. 

 

No idea what I am missing :(

Scriptname sacScrFurnitureKill extends ObjectReference

event OnInit()
	; Blocking the activation, so that the player doesnt accidentally hang himself
	BlockActivation(true)
endEvent

event OnActivate(ObjectReference akRef)
	; OnActivation block runs even on objects with BlockActivation(true), so the following checks if its NOT the player activating.
	if akRef != Game.GetPlayer()
		; We know its not the player, so force the actor to bypass the BlockActivation(true) state and activate (sit) in the furniture anyway
		Actor actorRef = (akRef as Actor)
		actorRef.ChangeAnimFaceArchetype(GetKeyword(0x00111073))
		activate(actorRef, true)
		utility.wait(20)
		actorRef.SetRestrained(true)
		actorRef.RemoveFromAllFactions()
		actorRef.IgnoreFriendlyHits(true)
		actorRef.SetProtected(false)
		; Wait 1 second to let the actor enter the furniture (adjust to however long your entry animation takes + a small buffer)
		;utility.wait(60)
		; Kill the actor
		;actorRef.Kill()
	endif
endEvent

Keyword function GetKeyword(int keywordId)
	return Game.GetForm(keywordId) as Keyword
endFunction

Noose.zip

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use