Davidheat Posted March 6, 2009 Share Posted March 6, 2009 Ya i would like a Script make it so that if you used a Item that would give you a perk Link to comment Share on other sites More sharing options...
Cipscis Posted March 6, 2009 Share Posted March 6, 2009 You're going to have to be a lot more specific than that - what sort of item? How is it supposed to be "used"? What is the script supposed to be attached to? To add a perk, just use the AddPerk function. You'll probably want to use either an OnEquip or OnActivate block, but you've been to vague for me to know which to recommend. Cipscis Link to comment Share on other sites More sharing options...
Davidheat Posted March 7, 2009 Author Share Posted March 7, 2009 O ya good point, Ok i went it to "Player use/eat ____ and now gets _____ Perk Link to comment Share on other sites More sharing options...
Cipscis Posted March 7, 2009 Share Posted March 7, 2009 I assume from your reference to "eating" the item that it will be an ingestible? If this is the case, then you'll want to use a ScriptEffectStart block, which would be applied to the ingestible through a Base Effect with Effect Archetype "Script" and your Effect Script defined as its "Assoc. Item". If it's a book, then it's slightly different. Although books, like ingestibles, appear under the "Aid" section of the Pip-Boy's inventory menu, "using" them will trigger an OnEquip block. Cipscis Link to comment Share on other sites More sharing options...
Davidheat Posted March 7, 2009 Author Share Posted March 7, 2009 i see, so what would a finish script like that look like? Am still new to Scripting Link to comment Share on other sites More sharing options...
Cipscis Posted March 7, 2009 Share Posted March 7, 2009 What you're trying to do is fairly simple, so something like this should be all you need:ScriptName AddMyPerkOnEat Begin ScriptEffectStart if HasPerk MyPerk == 0 AddPerk MyPerk endif EndThat Effect Script should be used in a Base Effect, which will then be used by your ingestible. You'll want to replace "MyPerk" with the EditorID of your Perk. The "if HasPerk == 0" condition ensures that the perk's rank won't increase if more than one instance of the ingestible is consumed. If you want the rank to increase with every one of them that the player consumes, just remove the condition. Cipscis Link to comment Share on other sites More sharing options...
Davidheat Posted March 20, 2009 Author Share Posted March 20, 2009 OK ty and here is a Kudos for you as well Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.