h00ver Posted November 17, 2012 Share Posted November 17, 2012 (edited) I'm trying to script a weapon that does fatigue damage to knock a target out, but also removes their hostility upon revival. Here's the script I have so far... scn knockoutscript Ref TeslaTarget Begin OnHitWith "weapon" set TeslaTarget to GetOwnerLastTarget TeslaTarget.IgnoreCrime 1 TeslaTarget.Damageav Fatigue 1000 TeslaTarget.SCAOnActor Player End It seems as thought the script does not activate, and I am guessing the problem is with the target variable. I ran it through cipscis, and when I moused over the functions, it said they were calling "void". Anyone have any insight on how I should fix the script? Edited November 17, 2012 by h00ver Link to comment Share on other sites More sharing options...
viennacalling Posted November 17, 2012 Share Posted November 17, 2012 I want to say get rid of "weapon" on the Begin OnHitWith. That spot is where you are supposed to indicate if the script only applies to a particular ActorID. Link to comment Share on other sites More sharing options...
h00ver Posted November 18, 2012 Author Share Posted November 18, 2012 I don't think its that. Geck wiki page said that a weapon ID goes after the onhitwith in order to specify a specific weapon that runs the script. I think there is an issue with the variable TeslaTarget. For some reason it doesn't store the NPC that got hit with my weapon in the variable, so when the script runs there is no target to run the effects on. Is there any other way to store the npc that got hit into a variable? Link to comment Share on other sites More sharing options...
viennacalling Posted November 18, 2012 Share Posted November 18, 2012 Ah, I wasn't fully paying attention. You don't want OnHitWith, you want OnHit. Link to comment Share on other sites More sharing options...
h00ver Posted November 18, 2012 Author Share Posted November 18, 2012 Oh ok I just saw that it is different in new vegas than oblivion, which is where I looked up the syntax. If I use OnHit, will the script only run when the npc is hit with the weapon that the script was attached to, or with any weapon? Link to comment Share on other sites More sharing options...
viennacalling Posted November 18, 2012 Share Posted November 18, 2012 The OnHit script is attached to the weapon and is specific to that weapon. Link to comment Share on other sites More sharing options...
Recommended Posts