Question About Killactor Command

Post » Mon Aug 30, 2010 11:11 pm

So I've narrowed down the ability to remove a limb from a pre-killed corpse to the killactor script, but have been reading and rereading it to no avail, I just don't get scripting language. Would anyone be able to help me with just a basic cut-and-paste template for removed limbs and whatever calling the script means, and such? It would be seriously appreciated.
User avatar
Marie Maillos
 
Posts: 3403
Joined: Wed Mar 21, 2007 4:39 pm

Post » Mon Aug 30, 2010 6:16 pm

I can help. But first a few more specifics. What limb are you trying to remove, and when? Is it when the body is activiated? When you hit a switch? At a certain quest stage?
User avatar
StunnaLiike FiiFii
 
Posts: 3373
Joined: Tue Oct 31, 2006 2:30 am

Post » Mon Aug 30, 2010 9:54 pm

This is good timing - I just wrote a little primer on exactly this for someone interested in extending my http://www.fallout3nexus.com/downloads/file.php?id=986 mod:
AMPUTATE utilises the http://geck.gamesas.com/index.php/KillActor function in order to destroy limbs. This function can be used on any actor, although its effects can differ depending on the actor's associated body part data.

Basically, every creature has an associated body part data form which dictates things like how much damage should be dealt for a hit to each limb, what effects crippling a limb should have, and whether or not a limb can be severed or made to explode. Each body part is sorted into a group depending on which actor value it is associated with.

Here's a list of them, as along with what they're usually associated with
  • BrainCondition - combat inhibitor etc.
  • PerceptionCondition - head
  • EnduranceCondition - torso
  • LeftAttackCondition - left arm
  • RightAttackCondition - right arm
  • LeftMobilityCondition - left leg(s)
  • RightMobilityCondition - right leg(s)

The condition of a limb is determined by the value of its associated actor value (which varies from full at 100 to crippled at 0), so two body parts with the same actor value (like a brahmin's heads) will share the same condition, and will be dismembered together.

When http://geck.gamesas.com/index.php/KillActor is called on an actor, an optional parameter can be used to dismember a limb. This limb is specified by a number which represents a type of limb, rather than an actor value, but will result in all limbs associated with the same actor value as the specified limb being dismembered. The values that represent each body part are listed in the GECK Wiki's documentation of http://geck.gamesas.com/index.php/KillActor, and can also be used to check if a limb is gone via the http://geck.gamesas.com/index.php/IsLimbGone function.

When http://geck.gamesas.com/index.php/KillActor is used to dismember a limb, the limb will explode if allowed, otherwise it will be severed if allowed. If neither of these behaviours is allowed, it will not be removed at all.

When http://geck.gamesas.com/index.php/KillActor is used to dismember the torso (assuming it can be dismembered), all other limbs will also be dismembered. For example, if you call this on an NPC in the console, they will completely explode:
KillActor player 0

I'm not sure what you're referring to by "the killactor script" though, unless you actually mean the function KillActor. Here's a quick explanation of its syntactical documentation:

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

  • http://geck.gamesas.com/index.php/KillActor should be called on a reference to an actor, either explicitly (e.g. "player.KillActor") or implicitly (i.e. "KillActor") if it is called in the script attached to the actor it should be called on.
  • The first optional parameter, here called "Killer", specifies which reference should be listed as having killed the actor. This can be found by using the http://geck.gamesas.com/index.php/IsKiller function. If the player is specified here, then the game will act as though the player killed them when it comes to things like experience gain. When just removing limbs, using an arbitrary non-player reference is just fine.
  • The second optional parameter, "DismemberLimb", is the one that you'll be interested in. It's here that you specify which limb you want to dismember. Have a look at http://geck.gamesas.com/index.php/KillActor's documentation on the GECK Wiki for a list of values and the limbs they represent.
  • The final optional parameter, "CauseOfDeath", is one that you can safely ignore in this case. It can be used to specify a value to be returned by http://geck.gamesas.com/index.php/GetCauseOfDeath if you really want to be able to do so though.

Cipscis
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Mon Aug 30, 2010 12:44 pm

An arm for one of them, and the legs for another, and I don't want to remove them at a certain time, I was hoping to have them gone before the player ever sees the corpse. I checked out the Gary corpse in the Anchorage Outcast Outpost, since it seems to have exactly what I need going on, but couldnt find anthing that semed to be doing it. Thanks, mate.
User avatar
TASTY TRACY
 
Posts: 3282
Joined: Thu Jun 22, 2006 7:11 pm

Post » Tue Aug 31, 2010 3:45 am

If you want to remove the limbs as soon as the player enters the area, try a script like this (removing both legs as an example):
int bLegsGoneBegin GameMode	if bLegsGone	else		set bLegsGone to 1		KillActor MQDadRef 7 ; LeftLeg1		KillActor MQDadRef 10 ; RightLeg1	endifEnd

Cipscis
User avatar
Carlos Rojas
 
Posts: 3391
Joined: Thu Aug 16, 2007 11:19 am

Post » Mon Aug 30, 2010 12:16 pm

I'll try that out as soon as I'm on the PC with Geck on it. Thanks so much, mate.
User avatar
Kelvin
 
Posts: 3405
Joined: Sat Nov 17, 2007 10:22 am

Post » Mon Aug 30, 2010 7:56 pm

It works! It works bloody perfectly! (no pun intended on that) Thank you so much, mate!
User avatar
stevie trent
 
Posts: 3460
Joined: Thu Oct 11, 2007 3:33 pm

Post » Mon Aug 30, 2010 12:44 pm

Awesome, well done!

Cipscis
User avatar
Marlo Stanfield
 
Posts: 3432
Joined: Wed May 16, 2007 11:00 pm


Return to Fallout 3