Can I check if the player takes money from a body?

Post » Wed Apr 06, 2011 2:41 pm

I am making a quest where the player must get money from a guy. He can either convince him to give it to you through several means, or you can just kill him and take it from his body. The issue is I don't know how to check if the player has taken the money from the body or not. I could just do a check to see if they have looted the body at all, but then they might leave the money and it would still count and could be weird. Also, I want to have these NPC's there the entire time the mod is active. So the player could load up my mod, kill the guy, then wait a month before doing the quest to gather from him. How might I stop this? Do you guys think it would just be alright if I have him disabled until the part in the quest where you have to talk to him? That way he HAS to be there when the player needs him, and after the player gets to that part in the quest, it doesnt matter if he dies or not. How should I go about handling these things? Could I run a GetItemCount on the dead body to see if it has no caps on it? Would that work? Thanks for any help or suggestions.

Gunmaster95
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am

Post » Wed Apr 06, 2011 9:13 am

yeah, the getitemcount thing was my first thought. why don't you just make a small script designed just to see if it works? making and testing that should take mere minutes. I don't see why it wouldn't work. And the disabling part sounds fine.
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Wed Apr 06, 2011 12:40 pm

Alright, after some thought I dont think the player will mind of the NPC's dont really 'exist' until they are needed in the quest. The chances of the player even going to the right places to find them are so slim. I will try the GetItemCount thing, and if that doesnt work I will simply make it so the player has to activate the body, and I will trust they would take the fat stack of caps on it. If they dont, they just pay with their own money. Thanks for the response mezo6.
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Wed Apr 06, 2011 9:59 am

Well, maybe you could make it so that caps are automatically added to the player's inventory if the player activated the body, or opened it's inventory, using onactivate and gethealth == 0
User avatar
JaNnatul Naimah
 
Posts: 3455
Joined: Fri Jun 23, 2006 8:33 am

Post » Wed Apr 06, 2011 11:03 am

Actually, that's a great idea. So the caps will never actually be on them. If the circumstances are right you will retrieve them when you 'search' the body. Thanks!
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Wed Apr 06, 2011 5:22 pm

glad to be of help.
User avatar
Louise
 
Posts: 3407
Joined: Wed Nov 01, 2006 1:06 pm


Return to Fallout: New Vegas