| Adny   Posting Freak
 
 Posts: 1,766
 Threads: 6
 Joined: Mar 2012
 Reputation: 
173
 | 
			| RE: script again.. 
 
				First, in the level editor find the area "placeWW", in the second tab, make sure "Item Interaction" is checked. Here's the script based on what I think you're trying to accomplish:
 
 void OnStart()
 {
 SetLocalVarInt("PlaceItemVar", 0);
 AddUseItemCallback("", "contWW_2", "placeWW", "ItemInOven", true); ///when the player uses "contWW_2" on "placeWW", it triggers "ItemInOven".
 SetEntityConnectionStateChangeCallback("ovenlever", "PullLever"); //Triggers the function "PullLever" when the lever is pulled.
 }
 
 void ItemInOven(string &in asItem, string &in asEntity) //Removes the item from inventory, adds a variable
 {
 RemoveItem(asItem);
 AddLocalVarInt("PlaceItemVar", 1);
 }
 
 void PullLever(string &in asEntity, int alState) //If the variable is 1 and the lever is pulled, "contBmeat" will be set active
 {
 if(GetLocalVarInt("PlaceItemVar") == 1 && alState == -1)
 {
 SetEntityActive("contBmeat", true);
 }
 }
 
 I hope that's more along the lines of what you want to accomplish;l if there are still any issues/problems, reply back with explicit detail of exactly you want the player to do for this puzzle.
 
 Hope that helped!
 
 I rate it 3 memes. |  | 
	| 09-10-2012, 12:49 AM |  |