Frictional Games Forum (read-only)

Full Version: Inventory check
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys

im at a point where i want the game to check if the player has a certain item in his inventory, when he enters a map, and if he has, i want an area to be activated.

But that this is only my first serious cs, im not that much into to the check functions yet.

I would really appreciate it, if you could help me out on this one.
check the engine scripts at frictionals wiki, otherwise i think it's something like HasItem(string& asName);


also I'm currently working on a custom story, so if you speak English we could help each other out, Add me on skype if interested. skype name: keegando
void OnStart() // When the map runs for the first time.
{
if(HasItem("ItemName")) // Checks to see if the item is in the player's inventory.
{
SetEntityActive("AreaName", true); // Activates the area.
}
}
Do what obliviator said, except put in OnEnter.
thanks guys