Cutting the head off a corpse

Post » Sat Aug 07, 2010 12:34 am

Hey, new here, could use some help.

As part of a quest, the player has to kill a certain NPC and bring back his head. I could obviously just put an "NPC's head" object in the inventory (and did so for the time being) but I'd like it to be more realistic. For this I need two things:

1. How would I go about re-creating the effect of the Cannibal perk but instead of 'Devour' the option would be to 'Decapitate'? I've looked at it but it's using the perk mechanic to create an additional activation option. There is no OnLoot blocktype that I've seen :/

2. Is there a way to make a part of the NPC model disappear? After the decapitation it'd be nice if the actual head of the NPC would disappear.

Thanks.
User avatar
Killah Bee
 
Posts: 3484
Joined: Sat Oct 06, 2007 12:23 pm

Post » Fri Aug 06, 2010 10:37 pm

I can help with some of this. You can use the OnActivate block in a script you place on the NPC, that is what you need when you say "OnLoot". Then if the quest is a certain stage or something, have it show a custom menu that says like, "Would you like to decapatate Mr./Mrs. Whatever?" and you can say yea. Or just make it show a message that says "You cut off their head" and then it adds the object to your inventory. As for getting rid of the head, I know you could 'sever' it with a command, and I think you can then disable that chunk, but I'm not sure how.
User avatar
Bones47
 
Posts: 3399
Joined: Fri Nov 09, 2007 11:15 pm

Post » Sat Aug 07, 2010 1:46 pm

You can't selectively disable body parts - they're all part of the same reference. The best thing you could do would be to use http://geck.gamesas.com/index.php/KillActor to destroy the character's head.

Cipscis
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Post » Sat Aug 07, 2010 12:14 pm

You can't selectively disable body parts - they're all part of the same reference. The best thing you could do would be to use http://geck.gamesas.com/index.php/KillActor to destroy the character's head.

Cipscis

Yea and the problem with that is it would be like "You decapitate the person!" then their head would explode... Though, since that would be slightly humorous and its your only choice, it might work :D I would find it funny, and not care or go "Hey that makes no sense!" So give it a try.
User avatar
Betsy Humpledink
 
Posts: 3443
Joined: Wed Jun 28, 2006 11:56 am

Post » Sat Aug 07, 2010 1:47 am

Thanks, guys. KillActor actually works pretty well - yeah, the head does explode, but the sound is appropriate and the head disappears, that's all that matters :) it just looks like the player got a bit messy while removing it.

I do still have a problem with the decapitation option, though. I used OnActivate on the NPC - at first I thought this was going to interfere with the player's ability to speak with the NPC while still alive, but it works fine. Made a message box show up when activating the corpse that has two options: decapitate and search. The only problem is the message box shows up at the same time as the looting interface, overlapping it. Is there any way to suppress the looting interface until the player chooses the second option?
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

Post » Fri Aug 06, 2010 10:37 pm

Yes - don't call http://geck.gamesas.com/index.php/Activate until the player has pressed a button.

Cipscis
User avatar
Markie Mark
 
Posts: 3420
Joined: Tue Dec 04, 2007 7:24 am

Post » Sat Aug 07, 2010 10:32 am

Thanks, guys. KillActor actually works pretty well - yeah, the head does explode, but the sound is appropriate and the head disappears, that's all that matters :) it just looks like the player got a bit messy while removing it.


Haha man thats funny :P As for the activate thing, Cipscis is right. It wont actually activate the object, thus bringing up the loot menu, till you tell it to Activate in your script. So make your script look like this.

scn ExampleDecapitateScriptshort DoOnceBegin OnActivate  If DoOnce == 0	ShowMessage DecapitationMessage  EndIfEnd*Then put the menu coding here*


Then set up the menu part and under the two buttons make the first, the cut off head one, have the result 'Set MyHeadlessNPCref.DoOnce to 1' (Where MyHeadlessNPCref is the reference of whatever NPC you are decapitating) and the second option, to loot, 'Activate'. Without the ' of course. This way, it will show the message until they select decapitate, and wont stop if they loot. It also will only show the loot menu if they select loot. For the first option, also have it add the item, and update the quests as necissary.
User avatar
Christine Pane
 
Posts: 3306
Joined: Mon Apr 23, 2007 2:14 am

Post » Sat Aug 07, 2010 3:37 am

Great, thanks, got it to work perfectly.

One last question, for the sake of realism: is there any way to check if the NPC got disintegrated/melted thus making decapitation impossible?
User avatar
Lily
 
Posts: 3357
Joined: Mon Aug 28, 2006 10:32 am

Post » Sat Aug 07, 2010 2:26 am

Good thinking. You can use http://geck.gamesas.com/index.php/IsInCriticalStage to check for that.

Cipscis
User avatar
Shaylee Shaw
 
Posts: 3457
Joined: Wed Feb 21, 2007 8:55 pm

Post » Sat Aug 07, 2010 6:26 am

Nice, that did it. Thanks again for the help.
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am


Return to Fallout 3