Need Help Creating A Script For Healing Sword

Post » Wed Jun 20, 2012 4:48 am

I'm new to modding, so all I know is Skyrim/Papyrus. But maybe that's good because I'm not trying to do something "the old way". But that makes me unqualified to say which is better, on the actor or on the weapon.

Did you try Red's script to see if the OnHit event fires? I'd love to know. if you put in the first line of the event:

Debug.Notification("I hit somebody")

you'll get a message on a successful hit.
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Wed Jun 20, 2012 2:52 pm

I'm new to modding, so all I know is Skyrim/Papyrus. But maybe that's good because I'm not trying to do something "the old way". But that makes me unqualified to say which is better, on the actor or on the weapon.

Did you try Red's script to see if the OnHit event fires? I'd love to know. if you put in the first line of the event:

Debug.Notification("I hit somebody")

you'll get a message on a successful hit.

No. Mainly because I don't have Skyrim for the PC yet. I am about to get it and because of that, I am getting ready for all my modding experiences.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am

Post » Wed Jun 20, 2012 12:36 pm

I'm new to modding, so all I know is Skyrim/Papyrus. But maybe that's good because I'm not trying to do something "the old way". But that makes me unqualified to say which is better, on the actor or on the weapon.

Did you try Red's script to see if the OnHit event fires? I'd love to know. if you put in the first line of the event:

Debug.Notification("I hit somebody")

you'll get a message on a successful hit.

Actually I was catching when someone ELSE hits YOU...the only way to catch "I hit someone" is to put a script on an enchantment effect on a weapon, or on a spell effect. There is no direct "IHitSomebody" event.
User avatar
Janeth Valenzuela Castelo
 
Posts: 3411
Joined: Wed Jun 21, 2006 3:03 am

Post » Wed Jun 20, 2012 3:23 pm

You know, I'm just gonna copy and paste the Ring of Hircine's Script and change the Power so it is what I am asking for. That prolly would be easier today, unless the Script isn't what I am thinking about.

Also, 1,000th post. Yeah! That doesn't matter at all!
User avatar
I’m my own
 
Posts: 3344
Joined: Tue Oct 10, 2006 2:55 am

Post » Wed Jun 20, 2012 5:04 am

Actually I was catching when someone ELSE hits YOU...the only way to catch "I hit someone" is to put a script on an enchantment effect on a weapon, or on a spell effect. There is no direct "IHitSomebody" event.

Thanks for clearing that up. I had already thought that to be true. I got confused because the script extends an ObjectReference, so I thought you intended on attaching it to the sword.
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Wed Jun 20, 2012 1:49 am

Thanks for clearing that up. I had already thought that to be true. I got confused because the script extends an ObjectReference, so I thought you intended on attaching it to the sword.

Oh it is...but as an item equipped by the player, it catches any events the player gets.
User avatar
Benji
 
Posts: 3447
Joined: Tue May 15, 2007 11:58 pm

Post » Wed Jun 20, 2012 12:39 pm

Oh it is...but as an item equipped by the player, it catches any events the player gets.

Awesome.... Double thanks for clearing that up. I didn't know it did that. Armor too?
User avatar
Aliish Sheldonn
 
Posts: 3487
Joined: Fri Feb 16, 2007 3:19 am

Post » Wed Jun 20, 2012 8:03 am

Oh it is...but as an item equipped by the player, it catches any events the player gets.

Are you sure? I couldn't get it to work. I tested by putting this script on a custom weapon:

Scriptname TestObjScript extends ObjectReference  Event OnEquipped(Actor akActor)    Debug.Notification("Equipped test weapon.")EndEventEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)    Debug.Notification("Test weapon's OnHit triggered.")EndEvent

The script was working because I saw the message when I equipped the weapon. Then I let some NPCs attack me for a couple minutes but the second message never showed up.
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Wed Jun 20, 2012 2:11 am

I just did the exact same test as RandomNoob.. on both of those events, with the same results. bummer I had dreamed up all kinds of ways to use that.
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Wed Jun 20, 2012 3:28 pm

Well Poo. Guess you'd have to have the sword/armor cast a "Scripted" spell at the player when it is equipped that captures the OnHit and handles that part
User avatar
Brian LeHury
 
Posts: 3416
Joined: Tue May 22, 2007 6:54 am

Post » Wed Jun 20, 2012 5:46 am

I think it would be easier just to make a Power, or Lesser Power, that gets added to your spellbook when you wield the weapon then removed from your spellbook when you unwield, like Hircine's Ring does with that one Werewolf Power. I personally think that would be much easier to do with Skyrim's scripting system and will also limit the player with using the special effect since it'll take time to recharge.. That is agree-able, right?
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Previous

Return to V - Skyrim