Trouble with non-lethal weapon script

Post » Sun Jul 28, 2013 9:13 am

So Im trying to make a non-lethal gun. Im calling it the "Temporal Displacer" for now. The script needed is simple, but I svck at scripting. It needs to disable the NPC, then after a minute or two, re-enable the NPC, and maybe conjur up a nice visual effect(like the zap glove electrical effect). Just to give the illusion that the NPC was temporarily phased out of spacetime.

I've made scripted weapons before. One such weapon was the 'kleptotron', a gun that allows you to access an NPC's inventory without any of the limitations of pickpocketing. So I have a vague idea of where to start. So far, I've got the projectile set to create the electrical effect, and the script set to disable the NPC. But Im not sure how to get the NPC to re-appear after a set time, or how to get the electrical effect to play when they re-emerge.

User avatar
Tracy Byworth
 
Posts: 3403
Joined: Sun Jul 02, 2006 10:09 pm

Post » Sun Jul 28, 2013 12:05 am

Here is what I've got so far. All it does is disable the NPC. There is no cool effects shader, and the NPC never re-enables after 10 seconds. I can get the effects shader to play on hit if I do it through the Weapons > Art > Impact Data. It's the NIF effects\NV\WeaponEffects\impactZap.NIF

ScriptName vanishScriptfloat Timerbegin ScriptEffectStart	PMS pulseDisableFXShader	disable	Set Timer to 10EndBegin ScriptEffectUpdate		If Timer <= 0                PMS pulseDisableFXShader			enable		EndIf		Set Timer to (Timer - GetSecondsPassed)	EndIfEnd
User avatar
Theodore Walling
 
Posts: 3420
Joined: Sat Jun 02, 2007 12:48 pm


Return to Fallout: New Vegas