I Need A Way To Damage Npc's With A Script

Post » Mon Sep 21, 2009 5:06 pm

I need a way to damage NPC's with a script. I found out modav2 health to a negative number crashes Oblivion. Is there another way to damage them? I tried addspellNS with a bunch of ability spells which had drainhealth and drainfatigue set at massive numbers yet they seemed to have no effect on the NPC. I tried damage health and damage fatigue and got it to work on my player, but they kept damaging me after the timer ran out. Do I need to add a timer to remove them?

If someone knows of a way to add script damage I'd prefer that than mess with these spells.

EDIT: I got it working with a timer that takes it off after 10 seconds. I'd still rather damage the actor with my script.
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Mon Sep 21, 2009 6:17 pm

Have you tried getav health to see where the health is at, and then adjusting your modav2 health so that you never force the health to go below 0?

EDIT: Unfortunately I can't test this real quick for you. My computer is out of order right now.
User avatar
asako
 
Posts: 3296
Joined: Wed Oct 04, 2006 7:16 am


Return to IV - Oblivion