Complete nobo to scripting, but wondering how I can accompli

Post » Tue Dec 06, 2011 1:51 pm

In a topic in the General Oblivion chat, there was talk of cooking our own meals. I then had the idea, Why not make an oven, that uses vanilla ingredients, and makes for example, a shepherds pie, if you have the right ingredients.
I was thinking it would be possible if upon activating the oven, it opens a menu, which has a variety of foods listed. I would also have a book of recipes. but when a player clicks on the choice in the menu for say, a sandwich, it checks the inventory of the Player, for Bread Loaf, Cheese, and Ham. It would then remove them from the inventory, and add a Sandwich item into the inventory. But alas I have no grasp on scripting at all, so I am not sure how to accomplish this.
EDIT: Whoops, I meant noob to scripting >.<
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Tue Dec 06, 2011 1:26 pm

Could be done, I think.

Personally, I would use Scripted Token and a Remote Chest to do it. Roughly, it would be something like:

Attacged to Oven:
Begin OnActivate    [ChestID].RemoveAllItems    [ChestID].AddItem [TokenID1]    [ChestID].Activate Player 1End


Then when the player picks a token something like:
Begin OnAdd Player   If ( Player.GetItemCount Bread >= 1 ) && ( Player.GetItemCount Cheese >= 1 ) && ( Player.GetItemCount Ham >= 1 )     Player.RemoveItem Bread 1     Player.RemoveItem Cheese 1     Player.RemoveItem Ham 1     Player.AddItem [SandwichID] 1     MessageBox" You prepared a Sandwich"   Else     MessageBox"You do not have the ingredients to make a Sandwhich"   EndIfEnd


Obviously this is very rough, and that code might not work in practice, but the idea works-- and this is how I would personally do it; others may have better/different ways, however.
User avatar
Ashley Hill
 
Posts: 3516
Joined: Tue Jul 04, 2006 5:27 am

Post » Tue Dec 06, 2011 2:28 pm

I have a working oven in my http://www.tesnexus.com/downloads/file.php?id=16308 mod. Your more than welcome to look at it.

The food items show up 'inside' or 'on top' of the oven.
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Tue Dec 06, 2011 11:59 am

the oven could also be a container. you put in ingredients, activate a switch on it or something, and if it has the right ingredients, it removes them and and adds whatever they make.
User avatar
Beth Belcher
 
Posts: 3393
Joined: Tue Jun 13, 2006 1:39 pm


Return to IV - Oblivion