Yes, in item B's script, do not allow the player to pick it up unless the "plrhaskey=1" condition is true.
To use that, you'll need to set the "Use Key" property of Item B to the name of Item A. That'll make it so Item A will "act" as a "key" for Item B, but in actuality it isn't really a key, just a way to prevent the picking up of Item B before Item A.
That oughta do it for ya.
But just for clarity, here is the script for "pickup1.fpi"
;Artificial Intelligence Script
;Header
desc = Pickup Item
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobankmiscping.wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=5
;End of Script
In the line checking for the players distance from the entity in order to pick up the item, you'll want to add the condition that we talked about. You'll end up with this:
;Artificial Intelligence Script
;Header
desc = Pickup Item
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40,plrhaskey=1:state=1,playertake,coloff,plrsound=audiobankmiscping.wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=5
;End of Script
NOTE: The manual says this about the "plrhaskey=X" condition:
Quote: "is true when player has pressed the key denoted by the value X"
Don't listen to that. It's TRUE when the player has obtained the item listed in the entity's "Use Key" field.
The one and only,
~PlystirE~
Dammit, Jim! I'm a programmer not a graphic designer!!!
(P)suedo code (L)inguist, (Y)ou (Sti)ll (R)eap (E)verything