Jump to content

Scripting a knockout weapon


h00ver

Recommended Posts

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 by h00ver
Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

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