Difference between revisions of "KillActor"

From GECK

 
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Function
 +
  |CSWikiPage = Kill
 +
  |origin = GECK1
 +
  |summary = [[KillActor]] kills the calling actor and takes three optional parameters to set who killed it, which limb to dismember, and the cause of death.  See [[GetCauseofDeath]] for death values.
 +
  |name = KillActor
 +
  |alias = Kill
 +
  |referenceType = Actor
 +
  |arguments = {{FunctionArgument
 +
    |Name = Killer
 +
    |Type = ref
 +
    |Optional = Optional
 +
  }}{{FunctionArgument
 +
    |Name = DismemberLimb
 +
    |Type = int
 +
    |Optional = Optional
 +
  }}{{FunctionArgument
 +
    |Name = CauseOfDeath
 +
    |Type = int
 +
    |Optional = Optional
 +
  }}
 +
  |Example = Kill player 1 0
 +
The scripted reference is killed by the player, their head is destroyed, and they are marked as having been killed by an explosion.
 +
}}
 +
==Notes==
 +
*Use some dummy NPC (e.g. CG01DadREF) for Killer param if you don't care who killed him and just want to use the other optional parameters. (Do NOT use player since that will cause "limb crippled" messages to be displayed.)
  
=='''Description'''==
+
*When a [[Body Part]] is dismembered, all Severable/Explodable body parts that share its assigned [[ActorValue]] will also be dismembered.
  
'''Kill Actor''' kills a specified actor and takes three optional parameters to set who killed it, which limb is dismembered, and how it got killed. See [[GetHitLocation]] for limb values and [[GetCauseofDeath]] for death values.
+
*If a body part is not checked as Explodable, neither it nor any body parts that share its ActorValue will explode when dismembered.
  
=='''Syntax'''==
+
*Dismember body part Locations [as of 12/12/08]
 
+
**0 - Torso
KillActor ''KillerActorREF (optional), DismemberLimb (optional), CauseOfDeath (optional)''
+
**1 - Head1
 
+
**2 - Head2
=='''Examples'''==
+
**3 - LeftArm1
 
+
**4 - LeftArm2
KillActor
+
**5 - RightArm1
 
+
**6 - RightArm2
Kill
+
**7 - LeftLeg1
 
+
**8 - LeftLeg2
Kill player, 1, 0
+
**9 - LeftLeg3
Player killed him, dismembers a limb, marks actor as killed by an explosion.
+
**10 - RightLeg1
 
+
**11 - RightLeg2
=='''Notes'''==
+
**12 - RightLeg3
*Use some dummy NPC (e.g. CG01DadREF) for Killer param if you don't care who killed him and just want to use the other optional parameters. (Do NOT use player since that will cause "limb crippled" messages to be displayed.)
+
**13 - Brain
 +
**14 - Weapon
  
*Dismember Limb Locations [as of 05/31/08]
+
*Actors under the effect of [[SetScale]] may remain unaffected by [[KillActor]]
**1 - head
+
**3 - left arm
+
**5 - right arm
+
**7 - left leg
+
**10 - right leg
+
  
=='''See Also'''==
+
*[[KillActor]] can be called on dead actors to dismember limbs
[[GetHitLocation]]<br>
+
[[GetCauseofDeath]]<br>
+
  
=='''Reference'''==
+
==See Also==
None provided.
+
*[[GetHitLocation]]
<!-- [[KillActor_Reference|List of functions that use KillActor]] (wiki) -->
+
*[[GetCauseofDeath]]
 +
*[[Body Part]]
 +
*[[ActorValue]]
 +
*[[ResurrectActor]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Functions (GECK 1.1)]]
 +
[[Category:Godsend Functions]]
 +
[[Category:Godsend Functions (GECK 1.1)]]

Latest revision as of 08:39, 12 January 2011

Link to TES4 Construction Set Wiki: Kill.

A function included in the GECK version 1.1.0.36.

Description

KillActor kills the calling actor and takes three optional parameters to set who killed it, which limb to dismember, and the cause of death. See GetCauseofDeath for death values.

Syntax

Actor.KillActor Killer:ref DismemberLimb:int CauseOfDeath:int 

Or:

Actor.Kill Killer:ref DismemberLimb:int CauseOfDeath:int

Notes

  • Use some dummy NPC (e.g. CG01DadREF) for Killer param if you don't care who killed him and just want to use the other optional parameters. (Do NOT use player since that will cause "limb crippled" messages to be displayed.)
  • When a Body Part is dismembered, all Severable/Explodable body parts that share its assigned ActorValue will also be dismembered.
  • If a body part is not checked as Explodable, neither it nor any body parts that share its ActorValue will explode when dismembered.
  • Dismember body part Locations [as of 12/12/08]
    • 0 - Torso
    • 1 - Head1
    • 2 - Head2
    • 3 - LeftArm1
    • 4 - LeftArm2
    • 5 - RightArm1
    • 6 - RightArm2
    • 7 - LeftLeg1
    • 8 - LeftLeg2
    • 9 - LeftLeg3
    • 10 - RightLeg1
    • 11 - RightLeg2
    • 12 - RightLeg3
    • 13 - Brain
    • 14 - Weapon
  • Actors under the effect of SetScale may remain unaffected by KillActor
  • KillActor can be called on dead actors to dismember limbs

See Also

Personal tools