civ77 Posted February 13, 2012 Share Posted February 13, 2012 (edited) I am completely new to Papyrus but I have experience with Java, I am trying to write a script which cancels the playback of a sound when a player fires a specific kind of arrow and plays a different one. So to do that I think that I would need to use the OnAnimationEvent(Player, Bow_Release.hkx) event and if the player has the kind of arrow I want equipped then Sound.StopInstance(ID of the sound) and Sound.Play(My new sound) The problem is I don't know what I'm supposed to extend, how to tell if the player has an item equipped, where I'm supposed to attach this script to or how to get the "aiInstanceID" of the sound (it changes every play of the sound). Edited February 13, 2012 by civ77 Link to comment Share on other sites More sharing options...
Cipscis Posted February 13, 2012 Share Posted February 13, 2012 There is no native "OnAnimation" event. Here's a list of all native events - Category:Events What you extend depends on what your script will be attached to. If your script will be attached to an Actor, for example, you'll want to extend "Actor". Cipscis Link to comment Share on other sites More sharing options...
civ77 Posted February 13, 2012 Author Share Posted February 13, 2012 sorry that was a typo I meant "OnAnimationEvent" Thanks for clearing up what I would extend (I guess I would extend a quest and do the thing to make it run in the background). Link to comment Share on other sites More sharing options...
civ77 Posted February 13, 2012 Author Share Posted February 13, 2012 There is no native "OnAnimation" event. Here's a list of all native events - Category:Events What you extend depends on what your script will be attached to. If your script will be attached to an Actor, for example, you'll want to extend "Actor". Cipscis I just noticed that you made "silence is golden" could you send me your Papyrus source code related to canceling sounds (or all of it and I can look through it myself)? Link to comment Share on other sites More sharing options...
Cipscis Posted February 14, 2012 Share Posted February 14, 2012 Ooh, I hadn't seen that event before, thanks. I never have any issues with sharing my source code, but I didn't use Papyrus at all in any of my mods that reduce NPC greetings (all variations on one another). The required distance between the player and an NPC before they'll greet the player is controlled in a gamesetting, and all I had to do was edit its value. The name of this setting is fAIMinGreetingDistance. Cipscis Link to comment Share on other sites More sharing options...
civ77 Posted February 14, 2012 Author Share Posted February 14, 2012 bump Link to comment Share on other sites More sharing options...
Recommended Posts