Jump to content

Do 'x' on hit


Kiuassault

Recommended Posts

Hey there Nexus!

I need some help creating a script in the CK. I want to add a proc effect to the player's attacks, either from a perk or an item/buff. I am quite new to the CK and Papyrus but I have basic wiki knowledge. What I'm wondering is, where do I put the script if I want it to be active on the player at all times, and is there any way to do something in the script whenever the player attacks?

 

I was thinking about using the OnHit function, but sadly it only checks when the actor IS hit by something, not HITS. Is there any way to use this on every actor in the game and just check if the attacker is the player and then run a script on the player?

Link to comment
Share on other sites

I have the exact same problem with needing some kind of "OnAttack" event. I'll edit this with the tutorial on what to put this on when I find it.

 

Edit: here's the tutorial:http://forums.nexusmods.com/index.php?/topic/558795-script-tutorial-script-initialization-on-game-load/page__p__4577325__hl__papyrus__fromsearch__1&do=findComment&comment=4577325

Edited by civ77
Link to comment
Share on other sites

There's no "OnAttack" native event like you're looking for. The only way in which I know how to do that is quite complex and involves applying abilities or using ReferenceAliases to detect OnHit events from actors close enough for the player to hit them.

 

By the way, I've seen the term "proc" used probably a dozen times now, but I haven't the faintest clue what it means, and neither has anyone I've asked. You seem to know, so could you pehaps enlighten me?

 

Cipscis

Link to comment
Share on other sites

"Proc" is short for "Spec_Proc" which is a programming short for "Special Procedure" by some MUD makers or something. I'm skimming a Wiki to help in my explanations. Basically what he's asking is how would make a weapon have a chance to do a special procedure when it hits.. Basically the same thing as a Critical Hit.
Link to comment
Share on other sites

Could you help me make a ReferenceAlias script to do this? :3

 

Hehe, proc means an effect that sometimes activates on attack/attacked/heal/something like that. It's used a lot in WoW and probably other games too.

An example would be something like "Chance on hit: Increase Strength by 200 for 15 seconds"

Link to comment
Share on other sites

  • Recently Browsing   0 members

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