Damaging PlayerNPCs without a spell

Post » Mon May 07, 2012 10:34 pm

So, I have this trap. And it needs to hurt anyone that comes in contact with it (player and NPCs).

I can work out if people are in contact with it, that is no problem. My brain just must be dead or something, because I can't think of a way to damage people's health. I don't want to use a spell (since I don't want the magic effect visuals), and ModAv/SetAv on health doesn't work the same for NPCs as it does the player (I think). There must be a simple way to damage health that I'm not thinking of (I tried using the method that Traps ingame use, but that requires Havok collisions which I'm not using). The health needs to just get lowered and come back naturally (just like being injured in battle)

Any help would be appreciated.
User avatar
Jay Baby
 
Posts: 3369
Joined: Sat Sep 15, 2007 12:43 pm

Post » Mon May 07, 2012 11:56 am

Last time I checked, ModAV does work on health as expected, causing reversible damage. But I have my doubts, since the damage on other attributes by ModAv called from a script is irreversible instead.
If you don't mind using OBSE, you can use ModAV2 (which technically has been deprecated by ModAVMod damage) to be on the safe side.
User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Mon May 07, 2012 10:47 am

If your trap is designed to cause damage on contact, you can use one of the default trap scripts. For instance, the ceiling spikes in Ayleid ruins cause damage on contact. Try assigning the ARTrapLongSpikes01SCRIPT to your trap and see if that works.
User avatar
sally coker
 
Posts: 3349
Joined: Wed Jul 26, 2006 7:51 pm

Post » Mon May 07, 2012 11:35 pm

The Oblivion traps seem to require Havok (which requires the thing hitting the player to be moving using the physics engine). My trap doesn't do that so those don't work (I tried those).

My mod already uses OBSE however, so I should be able to use its functions. Thanks.
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am


Return to IV - Oblivion