vanblam Posted April 7, 2011 Share Posted April 7, 2011 Hi, I'm new to scripting and what not, but I wanted to ask something before I try to learn :P. I just simply want to add an attribute to a weapon ( Like Strength ) But I don't want it to be a cast or something along those lines, want it to be added right when you equip it, and removed once you unequip it. If that is an easy thing to do, is there also away for that attribute to be random? So basically once you equip the weapon the script would choose a number between this number and that number, setting that attribute in stone so to speak. So once you first equip it the number happened to be 7 and it will now stay at 7. Thank you Link to comment Share on other sites More sharing options...
Hickory Posted April 7, 2011 Share Posted April 7, 2011 You cannot use an 'On Self' enchantment on weapons. Weapons only use 'On Touch' enchantments. The whole point of a weapon enchantment is that it does extra damage when you attack something. Link to comment Share on other sites More sharing options...
fg109 Posted April 7, 2011 Share Posted April 7, 2011 (edited) How about using this as a weapon's script, and not as a weapon enchantment script? scn example ref tempref short tempshort short doOnce Begin OnEquip set tempref to GetContainer if (doOnce == 0) set doOnce to 1 set tempshort to (GetRandomPercent / 10) + 1 else set tempshort to (0 - tempshort) endif tempref.ModAV2 Strength tempshort End Begin OnUnequip set tempshort to (0 - tempshort) tempref.ModAV2 Strength tempshort End Edited April 7, 2011 by fg109 Link to comment Share on other sites More sharing options...
vanblam Posted April 8, 2011 Author Share Posted April 8, 2011 (edited) So would this script work if I just changed the name? lol I'm completely new to scripting, so it looks like Japanese to me at the moment.Cause I changed the name and I got like 3 errors when trying to save it. Edited April 8, 2011 by vanblam Link to comment Share on other sites More sharing options...
razorpony Posted April 8, 2011 Share Posted April 8, 2011 I'm pretty sure the function ModAV2 is an OBSE function. Meaning you'll need to open the construction set with the OBSE loader to save it, and run Oblivion with OBSE to use it. If you don't know already, OBSE is Oblivion Script Extender. It adds new functions and features to the scripting language. You're getting errors because the vanilla Construction Set has no idea what ModAV2 is. :biggrin: -Razorpony Link to comment Share on other sites More sharing options...
vanblam Posted April 8, 2011 Author Share Posted April 8, 2011 O I C haha.. I do have OBSE installed but I'm not running the Construction set under it :P Thanks for your help dude :) Link to comment Share on other sites More sharing options...
vanblam Posted April 8, 2011 Author Share Posted April 8, 2011 (edited) Ok I tested the script you made, but only 1 problem is it only has a negative effect. Once you equip it your strength doesn't change, but once you unequip it you loose strength, equip it again and your strength goes back to what it was. So its close it just needs to have a positive effect. :) Edited April 8, 2011 by vanblam Link to comment Share on other sites More sharing options...
Recommended Posts