Jump to content

Scripting help please


noveltyh3ro

Recommended Posts

So, what you do is:

1) Create a Magic Effect with an Effect Archetype of "Script", a Casting Type of "Constant Effect", and a "Delivery of Self". You should add a script like (Remember to not delete the top line already in the script):

 

 

Spell Property CastSpell auto
Actor ShieldHolder


Event OnEffectStart(Actor akTarget, Actor akCaster)
ShieldHolder = akTarget
endEvent


Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
if abPowerAttack == True && abHitBlocked == True
CastSpell.Cast(ShieldHolder, akAggressor)
endif
endEvent
 

2) Next, you create a Enchantment with a Casting of "Constant Effect", and a Delivery of "Self". You add your Magic Effect to this Enchantment's Effects. Don't worry too much about filling in any other fields.

3) This is optional but important if you want to apply this enchantment only to shields. Create a new FormList and add the already-existing keyword "Armor Shield" to it. Go back to your enchantment and add your Formlist to Worn Restrictions. While your there, you may as well also add, under Base Enchantment, the name of your own enchantment (This is important when disenchanting items with this enchantment.)

4) Now you can add the enchantment to some item (preferably a shield), go into your game, add the item to your inventory and test it out. I tested it and it works for me.

Link to comment
Share on other sites

Forgot to mention: You need to edit the properties of the script to make it function as you want it to. Edit the CastSpell property to be VoiceUnrelentingForce3.

I'm not sure as to how well you are familiar with adding scripts, editing scripts and editing the properties of scripts, but if you need help, you can ask or look online.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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