Jump to content

Weapon enchantment Question


vanblam

Recommended Posts

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

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

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 by fg109
Link to comment
Share on other sites

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 by vanblam
Link to comment
Share on other sites

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

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 by vanblam
Link to comment
Share on other sites

  • Recently Browsing   0 members

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