Another noob question about scripting

Post » Wed Dec 30, 2009 11:21 am

I'm sure its (again) pretty damn evident like the moon in the sky but how do you check if a player have an item ID in bag ? For instance, im trying to build a quest that require the player to get some stuff from the wasteland (junks, food etc.) I just cant figure how to check if the specified item is in the player inventory.

I feel so damn noob...

Slowly, i find my way in the geck and I (most of the time) find my way to do what i want.

thanks!
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Wed Dec 30, 2009 4:11 am

Int bPlayerHasTheStuffBegin GameMode	If bPlayerHasTheStuff		;Do whatever	Else		If (Player.GetItemCount ItemA == 0)		ElseIf (Player.GetItemCount ItemB == 0)		ElseIf (Player.GetItemCount ItemC == 0)		ElseIf (Player.GetItemCount ItemD == 0)		Else ; Player Has at least one of Item A, B, C, and D			Set bPlayerHasTheStuff to 1		EndIf	EndEnd

User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am


Return to Fallout: New Vegas