Jump to content

Disarming NPCs


Demeggy

Recommended Posts

Quick question, it can be done in VATs, anyone know if there's a way one can disarm an NPC when firing at them via a script?

 

if you have the reference of the target, then you should be able to 'break' the weapon:

 

npcRef.SetWeaponHealthPerc 0

 

to simulate a hit on it. Then the npc should just drop it because it's useless.

 

Is there anyway of applying this to any NPC you encounter though without prescripting every possiblr NPC Ref ID? Otherwise nice idea, me likey.

 

I assumed that you already had the Ref of the target npc from a weapon script. In that case targetRef == npcRef, so it would be

targetRef.SetWeaponHealthPerc 0

Others have done it with weapon scripts (I haven't, yet) - EVE is full of examples of this type of thing, so you don't need to have all NPC's pre-scripted.

 

So what we're syaing in on the weaponscript, in a GameMode block, I want to pop in

targetRef.SetWeaponHealthPerc 0

?

 

When you say EVE..? (Erp! :P)

 

Actually, you set up a spell that runs when the weapon gets a critical hit. This spell is then selected in the drop-down 'crit effect' box on the weapon. In the scripteffectstart block is where you put the command to set the NPC's weapon health to zero. I was suggesting that you look at the EVE mod for examples of how these effects can do whatever you want to the NPC. http://www.fallout3n...ile.php?id=8340

Link to comment
Share on other sites

  • Recently Browsing   0 members

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