IceDolphin Posted February 25, 2014 Share Posted February 25, 2014 (edited) Hey guys, well I'v recently been adding mods to my Fallout New Vegas, and Bethesda made Skyrim and Fallout Nv so I gave making mods for Fallout a try, Turns out i'm good at scripting although I'm still a complete noob. So I'v found out in order for a script to be active it has to be attached to something, and I'm working on a mod that brings up a message box everytime you enter combat, so I was wondering if you can attach scripts to the player, if so How? Thanks for you're input. Edited February 25, 2014 by IceDolphin Link to comment Share on other sites More sharing options...
Mishaxhi Posted February 25, 2014 Share Posted February 25, 2014 Add the script to a misc item and give that to the player. Ungainly and crude, but it works. There are other ways but it requires a decent knowledge of scripting or you'll end up using way more resources than necessary. Link to comment Share on other sites More sharing options...
IceDolphin Posted February 25, 2014 Author Share Posted February 25, 2014 Ok so i'm working on a mod where if you kill something you get 25 caps, if I apply that script to a misc item will it work if I kill the subject with anything? Link to comment Share on other sites More sharing options...
jazzisparis Posted February 25, 2014 Share Posted February 25, 2014 What I would do is use a dummy Quest as a carrier of a script that would run in the background, monitoring the number of kills and adding the caps whenever the latter is incremented. 1. Create a new Quest, tick Start Game Enabled and set Script Processing Delay to 1.0 2. Crate a new Script, set Script Type to Quest, and use the following code: scn AddCapsForKillsScript short iKills short iTemp short iCaps begin GameMode set iTemp to GetPCMiscStat "Total Things Killed" if iKills == 0 set iKills to iTemp elseif iTemp > iKills set iCaps to (iTemp - iKills) * 25 player.AddItem Caps001 iCaps set iKills to iTemp endif end 3. Re-open the Quest from step 1 and select this script from the dropbox. Link to comment Share on other sites More sharing options...
IceDolphin Posted February 25, 2014 Author Share Posted February 25, 2014 Ok thanks, but nobody answered my original question if you can attach scripts to a player. Link to comment Share on other sites More sharing options...
jazzisparis Posted February 25, 2014 Share Posted February 25, 2014 Yes, you can, but there is no reason to do so. Simply use the method I demonstrated above (a quest script) when you need a script to run on the player. You can also use an item (as Mish suggested), or an Actor Effect, but those methods are somewhat more complicated and less reliable. Link to comment Share on other sites More sharing options...
Mishaxhi Posted February 25, 2014 Share Posted February 25, 2014 (edited) It's an ambiguous question. Can you attach scripts to the player? No. Can you attach scripts to the "player"? Yes. We've both told you how to do the latter. Edited February 25, 2014 by Mishaxhi Link to comment Share on other sites More sharing options...
IceDolphin Posted February 25, 2014 Author Share Posted February 25, 2014 It was just a question out of curiosity, no need to go and kill me over it, the "dummy" quest is a good compromise. Link to comment Share on other sites More sharing options...
luthienanarion Posted February 25, 2014 Share Posted February 25, 2014 To count kills, I usually use a perk with the "add leveled list on death" entry point and a token with an object script that adds one to a counter and removes itself. This allows you to set exclusions so that only killing certain enemies adds to a count, etc. Jazz's method is a lot simpler if you don't want to dig too deeply into scripting. Link to comment Share on other sites More sharing options...
IceDolphin Posted February 26, 2014 Author Share Posted February 26, 2014 (edited) I do want to be the very best scripter, that no one ever was! But currently i'm still quite new to it, I'm trying to think of something creative but no to difficult I can come up with to test my knowledge. Oviousely I want to dig deep into it, but i'm not making things harder for me, i'm using Jazz's method because it's easier. And I don't like the thought of dragging an item around just for the effect. Edited February 26, 2014 by IceDolphin Link to comment Share on other sites More sharing options...
Recommended Posts