Jump to content

Script: Change weapon model/nif when attacking?


ghosu

Recommended Posts

Hello

 

I have no big clue 'bout scripting, is there a way to change from a weapon's nif1 file to nif2 in the moment i attack (press left mouse) or any other action like blocking, reloading whatever?

 

As example: Sword, 2 Nif files...one i colored blue, the other one red...when i equip the sword i see the blue version, in the moment i attack the script changes to the red version.

 

And if it is possible...i guess there would be no way to avoid the equip/unequip animation in the moment of the change?

 

thx & greetings

Edited by ghosu
Link to comment
Share on other sites

It's conceivable that you could use the SetModelPath function provided by SKSE to do this; however, that isn't what it was designed for, so you might encounter some difficulties there. Also, as far as I can tell there is no "OnAttack" event or equivalent, so getting the script to trigger would require some serious Papyrus gymnastics, to say the least.

 

EDIT: Scratch that last bit; you may be able to use the event OnPlayerBowShot.

Edited by JanusForbeare
Link to comment
Share on other sites

Well thx so far...as mentioned, i have NO clue 'bout scripting but there is a script in the Dwemer Mechanical Equipment Mod that changes from one nif to another when you draw your weapon so i might alter it...or the one from my old hidden blade projet...or i spend a few days to learn it.

 

So lets just imagine it WOULD work, this would lead to the next problem. In the moment of the attack it changes from NIF1 to NIF2, NIF2 would start with an equip animation so my weapon would be out of position. But how to avoid this animation? I guess manipulate the draw animation so there is no movement in it or delete the mechanism that triggers the animation when you equip a new weapon...

Edited by ghosu
Link to comment
Share on other sites

Or maybe something like this to avoid an equip animation when changing the nif:

 

http://666kb.com/i/c7kjnddsbtgf4rowj.gif

 

Rifle.nif is the normal weapon, A and B are both models that use unused armor slots or whatever...so when i equip RIFLE.nif and A.nif i've got both parts of the rifle. When i shoot the script changes to B.nif and starts with a loop animation. Now this is really out of the box but since it seems to be impossible to animate the mechanism using the skeleton and havok i have to use/trigger loop animations :(

Link to comment
Share on other sites

  • 4 years later...
  • Recently Browsing   0 members

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