Karnaj Posted March 2, 2010 Share Posted March 2, 2010 It's my understanding that the OnActivate command will only run on the equipping of an item, not the actual (my opinion of) activation. Basically it only works on the pick up of a bow not the drawing of the string or swing of a sword. Am I correct in this and is there a function for the "activation" of a weapon that I am unaware of that could help me do what I want? Basically I want to run a script every time a weapon is swung or a bowstring drawn, is there a function for that? Link to comment Share on other sites More sharing options...
Maigrets Posted March 2, 2010 Share Posted March 2, 2010 You are correct. Begin OnActivate does exactly that. You might find these helpful though as far as the weapon script. http://cs.elderscrolls.com/constwiki/index.php/Activate http://cs.elderscrolls.com/constwiki/index.php/OnActivate Other functions.http://cs.elderscrolls.com/constwiki/index...ctions_%28CS%29 There are plenty of scripting tutorials on the CS Wiki as well that might help you out. Link to comment Share on other sites More sharing options...
Vagrant0 Posted March 2, 2010 Share Posted March 2, 2010 Basically I want to run a script every time a weapon is swung or a bowstring drawn, is there a function for that?Technically, no. The closest you can get is by using an OBSE function to detect key presses and narrow down the logic based on what is equipped, if weapon is already drawn, ect. Link to comment Share on other sites More sharing options...
Karnaj Posted March 3, 2010 Author Share Posted March 3, 2010 Thank you both I appreciate the answers, and as stated I will just have to work on a work around for it. Ok let me ask this than. I am trying to have the script check for Equipped arrows only. I have tried.. ref ammoshort ammotype set ammo to player.GetEquippedObject 17 ; and 12 btwset ammotype to GetProjectileType ammo if (ammotype == 0) etc. etc. also tried ref ammo set ammo to GetEquippedObject 17 ; and 12 again if (ammo.GetProjectileType == 0) etc. etc. Neither one of those two setups work as I thought. The first doesn't seem to return a positive at all. The second will return a positive if there are any arrows in my inventory or equipped. I would like to have it only read arrows that are actively equipped for use. What am I missing. I'm trying to learn scripting and think I have a decent grasp on it, just not decent enough apparently. Link to comment Share on other sites More sharing options...
Recommended Posts