Kill

From the Oblivion ConstructionSet Wiki
Revision as of 07:54, 20 March 2008 by imported>DragoonWraith (→‎Use in Crime Detection: note on reseting the trick)
Jump to navigation Jump to search

Syntax:

[ActorID.]Kill actorID (optional)

Kills the actor. Note that the actor's health may still be above zero, because this function doesn't kill by modifying the health.

Essential actors will be made "unconscious" (in their normal temporary "dead" state).

The optional actorID parameter tells the system which actor is reponsible for the death. This is of primary importance in crimes and in triggering the OnDeath block when it uses it's optional actorID parameter.

Use in Crime Detection

The Kill command is unique because it allows you to assign someone as "guilty". This is invaluable as it allows scripters to trigger the game's crime detection code, which cannot be accessed by script any other way.

The most common way to do this is to have a dummy disabled NPC tucked away somewhere, and at the appropriate moment, the script can use MoveTo on him, and then use Kill with the optional parameter to make nearby NPCs react naturally to the attack. He can then be resurrected and moved away again for repeated use.

In order to get the victim himself to respond correctly, it may be necessary to use SetActorValue Responsibility.

The crime need not be murder, though initially a murder will be triggered. Use ModCrimeGold and ModPCMiscStat to change the murder into another crime with a different bounty.

Note, however, that if the player has never murdered someone before, the Dark Brotherhood quest may be triggered by this trick. There is currently no work-around for this unfortunate side-effect. The use of this trick should be mentioned in the readme, and it may be appropriate to link to the Stop Dark Brotherhood mod to allow players to ignore this side-effect.