Hi hi!
I think I can offer some help on this. I've been brewing up a script that acts like the equip menu so hopefully I can offer up something.
So in the "Edit items" option, there's a condition (12th one iirc) you can activate for items called "
is in invertory TAG (X) (ITEMNAME)" This condition basically checks "TAG (X)" as true so long as there are more than 0 (at least 1) of an item in your inventory.
You could try creating a script that checks for the condition of this tag every time they speak to whatever entity is acting as the gate keeper.
Code: Select all
global variable (5, tollcount) # I'm using the global declaration, variables are discarded within plotscripts after they finish
while (check tag (5) == TRUE) do( # as long as you have more than one of the "toll" item in your inventory, this will run!
delete item ("tollitem", 1) # this will delete/remove the item from the player's inventory every loop
tollcount += 1 # this will count how many of these items have been deleted/removed
)
if (tollcount == 10) then(
show textbox (10) # "Yep that's ten in all" the reply the player gets for fufilling this
)
else(
show textbox (11) # "You've got no "toll" items in your inventory, get lost!" # when the player has none of the items they need and haven't paid
)
That's the bare bones advice I can offer you. If you wanted to show a specific amount, you'll have to fudge around with the
string functions Hspeak gives you. There's an option to insert string IDs into textboxes "${S#}" from game.exe. I think "
globals to string" would help you get the correct value for telling the player how much more of an item they would need.