Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Inventory check
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#1
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
Find
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#2
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

- Inactive account -
08-04-2012, 04:23 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#3
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
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Inventory check

Do what obliviator said, except put in OnEnter.

I rate it 3 memes.
08-04-2012, 05:09 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#5
RE: Inventory check

thanks guys

CURRENT PROJECT:
A Fathers Secret == Just started
08-04-2012, 05:39 PM
Find




Users browsing this thread: 1 Guest(s)