Jump to content

Papyrus Scripting Help


Selonianth

Recommended Posts

Alright, so I'm kinda terrible at scripting, always have been and have tried to learn it in multiple languages multiple times. My brain just doesn't want to absorb that information for anything. I get some of the concepts but for actually putting it down so it functions correctly... that's beyond me. And that's where I need someone's help.



I need a conditional script that checks the type of arrow you have loaded and if it's a specific one, applies an enchantment/perk. It's for silver arrows, so I can do away with the silly explosion that makes them act wonky in comparison to normal arrows.


Link to comment
Share on other sites

A part of one of my scripts that can check the arrow type ..

 

If((Attacker as Actor).GetEquippedItemType(0)==(7))
Int AW=(ArrowTypeFormList.Find(abProjectile))
If(AW==(0))
ArrowChest.AddItem(CWArrowShort, 1, false)
ElseIf(AW==(1))
ArrowChest.AddItem(CWArrow, 1, false)
ElseIf(AW==(2))
; Missle Arrow
ElseIf(AW==(3))
ArrowChest.AddItem(SteelArrow, 1, false)
ElseIf(AW==(4))
ArrowChest.AddItem(OrcishArrow, 1, false)
ElseIf(AW==(5))
and so on down the list ...
also has all the arrow as: Property's at the top of the script.
Ammo Property SteelArrow Auto
and so on ... It can tell what type of arrow the player is using on hit.
but the key is the line .GetEquippedItemType(0)==(7))
Edited by NexusComa
Link to comment
Share on other sites

 

A part of one of my scripts that can check they arrow type ..

 

If((Attacker as Actor).GetEquippedItemType(0)==(7))
Int AW=(ArrowTypeFormList.Find(abProjectile))
If(AW==(0))
ArrowChest.AddItem(CWArrowShort, 1, false)
ElseIf(AW==(1))
ArrowChest.AddItem(CWArrow, 1, false)
ElseIf(AW==(2))
; Missle Arrow
ElseIf(AW==(3))
ArrowChest.AddItem(SteelArrow, 1, false)
ElseIf(AW==(4))
ArrowChest.AddItem(OrcishArrow, 1, false)
ElseIf(AW==(5))
and so on down the list ...
also has all the arrow as: Property's at the top of the script.
Ammo Property SteelArrow Auto
and so on ... It can tell what type of arrow the player is using on hit.
but the key is the line .GetEquippedItemType(0)==(7))

 

Could I get a copy of that script? And permission to use a modified version (I only need to check for one type of arrow) in my mod?

Link to comment
Share on other sites

Why can't you edit the arrow projectile and remove the explosion?

Also, I'm not familiar with silver arrows. Are those mod added?

They are. There's several mods that add them for stock Skyrim.

 

And you can't remove the explosion because the explosion is what gives them their anti-undead damage boost, since there's no way to directly apply an enchantment to arrows even in the CK or scripts. What I'm trying to do is apply a script instead to the bows or possibly player that will apply the perk that gives that damage when you have the right kind of arrow or weapon type equipped.

Link to comment
Share on other sites

You could just use a perk, exactly the same as silver swords from the base game. Basically put a condition on the weapon tab that it has to have keyword weaptypebow and then a condition on the perk owner tab that they must have silver arrows equipped. There would a drawback, though. The player would not get the bonus on the last silver arrow shot, but would get it on the last arrow of a different type that was shot if silver arrows were the lowest quality arrows in their quiver. Edited by lofgren
Link to comment
Share on other sites

You could just use a perk, exactly the same as silver swords from the base game. Basically put a condition on the weapon tab that it has to have keyword weaptypebow and then a condition on the perk owner tab that they must have silver arrows equipped. There would a drawback, though. The player would not get the bonus on the last silver arrow shot, but would get it on the last arrow of a different type that was shot if silver arrows were the lowest quality arrows in their quiver.

Which is... probably a bit better than the explosions to be fair but hn...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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