MastaWizard Posted February 11, 2012 Share Posted February 11, 2012 (edited) Basically i added a script to chickens. I used the Hello world tutorial. So when you click on the chickens it pops up hello world. Is there a way to instead make it when i click on the chicken it gives something out of its inventory. say the meat it has our something custom i added like Chicken Feathers (this script is for the mod i mad so you dont have to kill the chicken for the feathers). Any and all help is much appreciated and i will give credit if you just help me a little bit. ( and i actually get a workable script from your info) Please Help This Noob! Edited February 11, 2012 by MastaWizard Link to comment Share on other sites More sharing options...
KraGeRzR Posted February 11, 2012 Share Posted February 11, 2012 Scriptname ChickenDispenser extends ObjectReference Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().AddItem(FoodChicken, 1, true) endEvent FoodChicken is the editor ID in the CK - FoodChickenCooked for cooked. Change the "1" to whatever amount you want. Not sure if this works myself, since I'm a noob as well. Link to comment Share on other sites More sharing options...
MastaWizard Posted February 14, 2012 Author Share Posted February 14, 2012 WOW i need to try this and thank you very much sir really if this works i will make sure everyone knows you helped me. Link to comment Share on other sites More sharing options...
MastaWizard Posted February 14, 2012 Author Share Posted February 14, 2012 says Food Chicken is undefined in compiler i tried it anyway and nothing happens. but thanks for trying Link to comment Share on other sites More sharing options...
SirArindel Posted February 14, 2012 Share Posted February 14, 2012 (edited) Can you tell me how you made it so you can activate the chicken? I'm willing to make some tryouts things on them. It would help to post your script so I can help you back. PS: Food Chicken is just an example, you have to define it. add this at beginning of the script: Item Property MyItem Auto ;it doesn't matter the name (MyItem) (It's more of a shortcut after all) then Game.GetPlayer().Additem(MyItem, 1, true) ;true if you with to not show the message that it added the item That is, it should fix your compile error. After that, go to your item to which the script is attached and press Properties, that's where you select what does mean MyItem. Edited February 14, 2012 by omega2008 Link to comment Share on other sites More sharing options...
Cipscis Posted February 14, 2012 Share Posted February 14, 2012 omega2008 is right about the issue, have a look here for a longer explanation - EditorIDs in Papyrus Oh, and for omega2008, all actors can be activated - you just have to add an OnActivate event to your script and it will work. Cipscis Link to comment Share on other sites More sharing options...
SirArindel Posted February 14, 2012 Share Posted February 14, 2012 I already done this, I have the script, but remains a question. Where do I put it in? I added in the EncChicken and didn't work. Perhaps I did something wrong. Link to comment Share on other sites More sharing options...
Cipscis Posted February 14, 2012 Share Posted February 14, 2012 That should do the trick... If you script is the same as the one above, you could try extending Actor instead of ObjectReference, although that's just a guess. Cipscis Link to comment Share on other sites More sharing options...
Recommended Posts