Jump to content

Can't get script to work


Geeves83

Recommended Posts

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

endif

end

 

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

Thats strange... try setting up a message to see when the script runs,like:

Begin onequip

showmessage "Message1"

end

 

begin scripteffectstart

showmessage "Message2"

end

 

begin "Don't know"

showmessage "Message3"

end

don't have time to test it today,so maybe tomorrow i can help more..

Link to comment
Share on other sites

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...