4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
1.1 KiB

Scriptname hangedManScript extends objectReference
{Script for noose ropes. Point to an attach dummy and a corpse}
objectReference property nooseDummy auto
{Point to a rigidBodyDummy placed at the end of the rope.}
objectreference property corpse auto
{the hung person}
explosion property fakeForceBallNudge auto
bool shotDown
EVENT onLoad()
; this gets the guy actually hanging when the 3D is loaded up.
if shotDown == FALSE
;game.addHavokBallAndSocketConstraint(corpse,"NPC Neck [Neck]",nooseDummy,"AttachDummy",0,0,16)
game.addHavokBallAndSocketConstraint(corpse,"NPC Neck [Neck]",self,"JointHelper01",0,0,16)
endif
endEVENT
EVENT onHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
; debug.trace("Noose Rope Hit by: "+akAggressor)
; debug.trace("Noose Rope Hit by: "+akProjectile)
; debug.trace("Noose Rope Hit by: "+akSource)
game.removeHavokConstraints(corpse,"NPC Neck [Neck]",self,"JointHelper01")
nooseDummy.placeatme(fakeForceBallNudge)
shotDown == TRUE
endEVENT