Chance to poison target depending on Poison Resistance

Post » Thu Dec 27, 2012 6:57 pm

Hello, I'm working on quite a big mod, and I decided to make Poison Resistance affecting the chance of being poisoned. Here's the script:

scn AWMPoisonTestScriptref targetAshort rndBegin ScriptEffectStartset rnd to GetRandomPercentset targetA to GetCombatTarget  if targetA.getav PoisonResist <= rnd   targetA.castimmediateonself NightstalkerPoison   ShowMessage StonewallMessage  endifendifEnd

Script Type is Effect, also I made Base Effect and Actor Effect, and bound them all together, and added that Poison Effect to Feral Ghoul on every basic attack.
The problem is that I can't force it to work as I want. It sometimes poison the Ghoul himself, sometimes it poisons even me when Ghoul fights with Bighorner for example.
So the thing, is there any other combat, maybe in NVSE, to make it work? Tried GetSelf and was buggy too. I want it to work on every NPC, not just on player.

Thanks in advance.
User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm

Return to Fallout: New Vegas