Geeves83 Posted November 22, 2010 Share Posted November 22, 2010 Just wondering if anyone who knows their way around scripts at all can give me any suggestions as to what I'm doing wrong. I'm trying to put a script on the doctors bag that doesn't allow a character with a med skill under 40 to use it. Here's what I've got so far; scn JustinDocBagTestScript begin scripteffectstart if ( player.GetAV Medicine >= 40 ) CIOS JustinNVDoctorBag else showMessage JustinMedlowmsg player.additem NVDoctorBag 1 1 endifend I've basically took away all the effects on the doctors bag other than the attached script and made a duplicate unused item with all it's original effects (the justinnvdoctorsbag referred to in the script). But it doesn't work...anytime i use a doctor's bag, it just gets used without doing anything...no playing my message, no adding another bag, nothing. Anybody know what's going on? I'm not really to familiar with scripting and this is one of my first attempts, so be gentle please :) Link to comment Share on other sites More sharing options...
Aragron Posted November 23, 2010 Share Posted November 23, 2010 Ingestibles are "equiped" by the player(Don't ask...),so you need to use a OnEquip begin. Link to comment Share on other sites More sharing options...
Geeves83 Posted November 23, 2010 Author Share Posted November 23, 2010 Hey Aragorn, thanks for the quick reply. Actually I tried begin onequip originally, before trying scripteffectstart. The result is the same, unfortunately. I have no idea what's up. Link to comment Share on other sites More sharing options...
Aragron Posted November 23, 2010 Share Posted November 23, 2010 Thats strange... try setting up a message to see when the script runs,like:Begin onequipshowmessage "Message1"end begin scripteffectstartshowmessage "Message2"end begin "Don't know"showmessage "Message3"enddon't have time to test it today,so maybe tomorrow i can help more.. Link to comment Share on other sites More sharing options...
Geeves83 Posted November 23, 2010 Author Share Posted November 23, 2010 Good idea. Yeah, tried the test message....nothing is showing up, so it's not playing the script at all. I've triple checked, the script is definitely attached to the right formID. I tried changing the script type from object to effect, but then it doesn't show up in the drop down list. I tried dropping all my doc bags and picking them up again, and even going and buying other ones just in case. The esp is definitely saved and moved to the bottom of the list in FOMM.... I dunno...<shrug> Link to comment Share on other sites More sharing options...
Aragron Posted November 23, 2010 Share Posted November 23, 2010 ok... i managed to get a script working,i Created a new base effect and put the script there ,using scripteffectstart.open the file in GECK and filter zzz in the All option. Link to comment Share on other sites More sharing options...
Geeves83 Posted November 23, 2010 Author Share Posted November 23, 2010 Excellent! Works perfectly now. Thanks a lot, Aragorn, you've saved me mucho frustration, considering I was planning on implementing a script like this on a fair bit of other ingestibles as well. Also, I didn't thank you before for the script you did on the last forum post I put up (hit-location based armor), so thanks for that as well! It works well, but I'm still trying to toy around with it a bit before I implement it into my game. Having a script to work with and learn from is a huge help. So, double kudos to ya! Link to comment Share on other sites More sharing options...
mariuscg Posted November 30, 2010 Share Posted November 30, 2010 hi i saw you post and i have a problem maybe you could help me i ported js nano suit to new vegas :-? but the scripts works the first time and after the suit loads again the enchantment item appear in my inventory and when i select it no message appears :-? what do you think its the problem i checked out everything but it seans to be fine :-? Link to comment Share on other sites More sharing options...
Recommended Posts