Is there a way to block a companion from using a weapon they'd otherwise be proficient in? For instance, to prevent a fighter companion from using a greatsword, or prevent him from using peircing weapons. I think it would be a neat trick for story reasons or to have the 2nd edition clerics use blunt weapons only restriction.
Preferably the companion would also have a speakstring saying they can't use the weapon if you try to give them one to use.
Block companion from using specific weapons?
Débuté par
kamalpoe
, août 05 2010 01:46
#1
Posté 05 août 2010 - 01:46
#2
Posté 05 août 2010 - 02:30
Use the *module's* OnEquip script to check for the companion tag and the base item type being equipped. Then pick a random string to be spoken as the item is unequipped.
#3
Posté 05 août 2010 - 02:35
you can use GetBaseItemType(...) and force the companion to unequip if it is of the specific type - im not sure how versatile that function is but you should get some results by looking into it. You can also try ActionUnequipItem(...) - together with some sort of speakstring they should give you a basic functionality to work with.
Edit: Plus what Wyrin suggested..
Edit: Plus what Wyrin suggested..
Modifié par Morbane, 05 août 2010 - 02:37 .
#4
Posté 05 août 2010 - 04:04
Tag based scrpting is your answer.
#5
Posté 05 août 2010 - 05:54
Shallina wrote...
Tag based scrpting is your answer.
Not sure it is in this case, unless you want to make a seperate script for all the differently tagged blueprints. The module level OnEquip is the best place to make these sorts of "blanket" alterations.
#6
Posté 05 août 2010 - 06:53
Tag based I don't think is the answer here as the script would have to be updated any time a new item of the greatsword category (for example) was added to the module. I figured it would be a custom onEquip for the companion, but I wasn't sure if you could detect a weapon category such as greatswords.
#7
Posté 05 août 2010 - 08:14
yeah, just use
if (GetTag(GetPCItemLastEquippedBy() == "companiontag" && GetBaseItemType(GetPCItemLastEquipped()) == BASE_ITEM_GREATSWORD))
(but done neater than that...)
if (GetTag(GetPCItemLastEquippedBy() == "companiontag" && GetBaseItemType(GetPCItemLastEquipped()) == BASE_ITEM_GREATSWORD))
(but done neater than that...)
#8
Posté 05 août 2010 - 08:26
I'll give that a look. I realized I have a companion that doesn't like exactly scimitars
, so this would be a nifty bit to stick in the mod.





Retour en haut






