Great. I just finished a simple version, that detects whether these three objects: cherry, sugar, pastry ... are within the "oven" prim, and then it gives a pie when touched. ... As MrSnoodles stated, placing those three items into a box, then the box into the oven prim will not work. More would need to be done. I'll place the simple working test oven near my landing zone, if you wish to try it as is.
------------------
// cook a cherry pie
string item_1 = "cherry";
string item_2 = "pastry";
string item_3 = "sugar";
integer item_1_found = FALSE;
integer item_2_found = FALSE;
integer item_3_found = FALSE;
default
{
touch_start(integer num_detected)
{
list inventory_list;
integer count = llGetInventoryNumber(INVENTORY_ALL); // Count of all items in prim's contents
string item_name;
while (count--)
{
item_name = llGetInventoryName(INVENTORY_ALL, count);
if (item_name != llGetScriptName() )
inventory_list += item_name; // add all contents except this script, to a list
if (item_name == item_1)
{
item_1_found = TRUE;
//llSay(0, "found cherry");
}
if (item_name == item_2)
{
item_2_found = TRUE;
//llSay(0, "found pastry");
}
if (item_name == item_3)
{
item_3_found = TRUE;
//llSay(0, "found sugar");
}
}
if ( item_1_found == TRUE && item_2_found == TRUE && item_3_found == TRUE )
{
llSay(0, "cook pie");
llGiveInventory(llDetectedKey(0), "cherry pie");
}
}
}
like(0)