For this, you need an "if" conditional statement to check to see if the item is in your inventory. HasItem is the variable you are looking for.
So assuming you already have your Collide Callback set up, you need to make the if check if you have the item in your inventory, and then carry out your event as you wish.
At its most basic, you can write it like this
void OnAreaCollide(string &in asParent, string &in asChild, int alState)
{
if(HasItem("lantern") == true)
{
//What to do if they have the lantern.
}
}
In this instance, when the Player walks through a ScriptArea which triggers the OnAreaCollide function, it will check if the player has a lantern. If they do, the function will carry out whatever is within the parenthesis underneath it, and then proceed to do everything after. This script will also
do nothing if the Player doesn't have the lantern, since I haven't written anything to accommodate for that.
The "lantern" in this case can be any item so long as the text in script matches the name of the item in the map. So if they pick up "key_study_4", and you want to test for that, then you should specify "key_study_4" within the brackets of HasItem().
If-Then-Else is a great tool for doing things if certain tasks/events have been met, and are incredibly useful tools for Custom Stories. I recommend reading up about them more on the wiki here:
https://wiki.frictionalgames.com/hpl2/am...statements