Jump to content

Photo

Aimed Spell Effect on Weapon Block Help

skyrim mods spellbreaker spell bloodskal blocking

  • Please log in to reply
8 replies to this topic

#1
jrseriel

jrseriel

    Stranger

  • Members
  • Pip
  • 5 posts

Hello Nexus Community,

 

Firstly, I am new to modding, and papyrus. I am trying to create a mod for a weapon when when you block the weapon casts the sparks spell. This was inspired by the spellbreaker shield effect but just on a weapon, and an aimed effect rather than it casting on yourself as the spellbreaker ward effect does. I tried to use the creation kit GUI to do this but I got an Enchanment error.

 

Is there any other way to accomplish this?

 

Thank you & best regards.

-jr seriel



#2
GSGlobe

GSGlobe

    Enthusiast

  • Premium Member
  • 116 posts

1.Create Enchantment "Contact"

2.Make a new perk (name it whatever) -> Make new perk entry (Perk Entries Right click new) -> Check Entry point -> apply bashing spell -> sparks
3.Create Magic Effect Contact
4.On Magic Effect -> Apply Perk -> Choose your perk

5. Add you Magic Effect to your enchantment

 

Do note that concentration spells are abit wierd in this regard.

 

For blocking I could help you but that would require a script to my knowledge to cast the spell, otherwise there's different perk entry points you could check out.

Perhaps someone better could jump in with a different approach.

 

 

For Block

1. Create Enchantment "Contact"

2. Create Magic Effect "Constant Self" "Script"

3. Add this script -> add new script, "YourScript_Script" is replaced by whatever u want to call it

4. Fill properties in

5. Create Ability

6. Link your newly created magic effect you just made to that ability

7. create new magic effect "contact"

8. On Magic Effect -> Equip Ability -> Choose your Ability you made

9. Link effect to your enchantment

10. link enchantment to weapon

 

Spoiler

 

 

Best regards


Edited by GSGlobe, 06 November 2017 - 09:20 PM.


#3
jrseriel

jrseriel

    Stranger

  • Members
  • Pip
  • 5 posts

Hey thank you for the possible solution. Though I see "on contact", sparks is an aimed concentration spell. So basically I would instead change it to a constant effect with no cost, so that when you block the weapon casts sparks wherever I am aiming. I may have misread or interpretted what is going on there, but this is what I am trying to do.


Edited by jrseriel, 07 November 2017 - 04:51 AM.


#4
GSGlobe

GSGlobe

    Enthusiast

  • Premium Member
  • 116 posts

As far as weapon enchants goes, only a contact spell is an option. So how the above bashing perk entry work is that.

 

When you bash "contact" with npc, the perk does its thing -> apply spell -> sparks to target npc.

 

The way the block works is that, "contact" magic effect is just a placeholder for the ability, when you equip that weapon linking to the enchantment, you gain a Ability "which is always active while you have the weapon equipped", this ability registers for animation "block" start and block "out" meaning, when you block you cast sparks, when you stop blocking, it interupts the cast.



#5
jrseriel

jrseriel

    Stranger

  • Members
  • Pip
  • 5 posts

Thank you for the help. I will try this out tomorrow and see what I get!



#6
jrseriel

jrseriel

    Stranger

  • Members
  • Pip
  • 5 posts

I finally got around to trying this out. But I do not understand your script. If I copy and paste it I get compilation error. When I copy and paste this...

Scriptname YourScript_Script extends activemagiceffect   
actor myTarget ; References the actor
Spell Property YourSpell auto ; References your spell, change property to sparks EVENT OnEffectStart(Actor Target, Actor Caster) myTarget = target RegisterForAnimationEvent(target, "blockstartout") ; Registering for block RegisterForAnimationEvent(target, "BlockStop") ; Registering for block stop ENDEVENT Event OnAnimationEvent(ObjectReference akSource, string asEventName) if (akSource == myTarget) if asEventName == "blockstartout" ; when block, this event happens. YourSpell.Cast(mytarget) ; Yourspell if asEventName == "BlockStop"; when u stop block this even happens myTarget.InterruptCast() ; interupt concentration spell "sparks" endif endif endEvent
Event OnRaceSwitchComplete() ; event here needed if u ever transform so script starts again

    Utility.Wait(1.0)
    RegisterForAnimationEvent(target, "blockStartOut")
    RegisterForAnimationEvent(target, "BlockStop")
 
EndEvent

Any help would be appreciated. 



#7
GSGlobe

GSGlobe

    Enthusiast

  • Premium Member
  • 116 posts

Copy paste this into a script you make.

 

Change Property "castSpell" -> Sparks

 

Make this an ability and then link it to your enchantment or however you want it.

 

Might need on race change if you ever transform into a werewolf or vampire so it begins to register again without reequipping the weapon / shield enchantment after your back in human form.

 

Spoiler

 

This part here,you can paste into the end of the script if you're going to be using a transformation.

 

Event OnRaceSwitchComplete() ; event here needed if u ever transform so script starts again

Utility.Wait(1.0)
RegisterForAnimationEvent(target, "blockStartOut")
RegisterForAnimationEvent(target, "BlockStop")

EndEvent

 

 

EDIT: I'll be happy to help if you write down your concerns or questions.


Edited by GSGlobe, 02 December 2017 - 07:37 AM.


#8
jrseriel

jrseriel

    Stranger

  • Members
  • Pip
  • 5 posts

Thank you for all of your help. I was able to get this to work however, it causes my other effects on the enchantment to stop working.



#9
GSGlobe

GSGlobe

    Enthusiast

  • Premium Member
  • 116 posts
Cant help you If you dont Tell me what stopped working.





Also tagged with one or more of these keywords: skyrim, mods, spellbreaker, spell, bloodskal, blocking

Page loaded in: 1.051 seconds