Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
Inventory check
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.
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
08-04-2012, 03:42 PM |
|
Artyom
Senior Member
Posts: 370
Threads: 27
Joined: Jul 2012
Reputation:
11
|
RE: Inventory check
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
|
|
08-04-2012, 04:23 PM |
|
Obliviator27
Posting Freak
Posts: 792
Threads: 10
Joined: Jul 2011
Reputation:
66
|
RE: Inventory check
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.
}
}
|
|
08-04-2012, 05:05 PM |
|
Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
|
RE: Inventory check
Do what obliviator said, except put in OnEnter.
I rate it 3 memes.
|
|
08-04-2012, 05:09 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: Inventory check
thanks guys
CURRENT PROJECT:
A Fathers Secret == Just started
|
|
08-04-2012, 05:39 PM |
|