Overall check if player got food or water in bag

Post » Tue Jun 29, 2010 2:24 pm

Hi again community! Thanks again for all the previous answer! It help me a lot to get used to the GECK scripting.

Today im planing to add some global random quest for food and water in what i call my "hardcoe make over mod (wip)". I'd like to add the possibility to trigger some random quest showing up to the player when they're out of food and/or water. I have a script prototype in place, some planing done and a dialogue tree for my food/water quest already which will mostly ask the player to search around for some various items to trade for food or water with the quest giver. Is it possible to scan the player inventory for any ingestible food or water ( i mean globally instead of having a huge if with tuns of || in it) ?

Thanks again!
User avatar
Pat RiMsey
 
Posts: 3306
Joined: Fri Oct 19, 2007 1:22 am

Post » Tue Jun 29, 2010 12:36 pm

Make a formlist with all the food/water objects in it and use Player.GetItemCount FormList - this'll get you the sum of the amounts of each item in that form list that the player has in his inventory. So if he's got 3 Xs, 2 Ys, and 1 Z in his inventory (all of which are in the form list), that'd return 6.
User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am

Post » Tue Jun 29, 2010 10:32 am

There should be lists already, for the animations.
User avatar
Micah Judaeah
 
Posts: 3443
Joined: Tue Oct 24, 2006 6:22 pm

Post » Tue Jun 29, 2010 11:48 am

There should be lists already, for the animations.

thanks for your answer. I
User avatar
sarah taylor
 
Posts: 3490
Joined: Thu Nov 16, 2006 3:36 pm


Return to Fallout: New Vegas