Kiuassault Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
civ77 Posted February 19, 2012 Share Posted February 19, 2012 (edited) 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 February 19, 2012 by civ77 Link to comment Share on other sites More sharing options...
Kiuassault Posted February 19, 2012 Author Share Posted February 19, 2012 Didn't really find what I was looking for, are you sure you linked the right page? Link to comment Share on other sites More sharing options...
civ77 Posted February 19, 2012 Share Posted February 19, 2012 Yes, that page answers your question "where do I put the script if I want it to be active on the player at all times". Link to comment Share on other sites More sharing options...
Kiuassault Posted February 19, 2012 Author Share Posted February 19, 2012 Ah, nice. Still looking for a way to activate when the player attacks though. :sad: Link to comment Share on other sites More sharing options...
Kiuassault Posted February 19, 2012 Author Share Posted February 19, 2012 bumps Link to comment Share on other sites More sharing options...
Cipscis Posted February 19, 2012 Share Posted February 19, 2012 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 More sharing options...
Kalva Posted February 19, 2012 Share Posted February 19, 2012 "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 More sharing options...
Kiuassault Posted February 19, 2012 Author Share Posted February 19, 2012 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 More sharing options...
Cipscis Posted February 19, 2012 Share Posted February 19, 2012 Take a look at this thread on the official forums for some good information about attaching ReferenceAlias scripts to nearby Actors - Dynamically attaching scripts to Actors near the player Cipscis Link to comment Share on other sites More sharing options...
Recommended Posts