GetArmorType

Post » Sat Dec 10, 2011 12:01 pm

So I was wondering if the GetArmorType and GetWeaponType commands could be used "on target". I'm working on a script that would modify the amount of damage done after comparing the attacker's weapon and the defender's armor. Say, hitting plate armor with a dagger would be useless, but smashing it with a mace would do the trick.

No, I really don't want to attach a script to every single hostile NPC. :confused:

Ideas?
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Sat Dec 10, 2011 11:34 am

You would need MWSE to get the ID of an unspecified NPC you're hitting.

I don't think detecting sounds (there's a different one for heavy armor at least) would work.
You'd have to filter to make sure it isn't the player being hit, I think that much is possible - but you'd still have incorrect damage regulation on the first hit on any enemy.
User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Sat Dec 10, 2011 2:34 pm

You would need MWSE to get the ID of an unspecified NPC you're hitting.

Dude, MWSE is just another branch of the occult. There's no way I could ever do anything with that.
I don't think detecting sounds (there's a different one for heavy armor at least) would work.
You'd have to filter to make sure it isn't the player being hit, I think that much is possible - but you'd still have incorrect damage regulation on the first hit on any enemy.

It can be filtered? How?
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

Post » Sat Dec 10, 2011 6:10 am

If you keep tabs on the player's health, you should be able to differenciate between hits on the player and hits on NPCs as long as they don't happen on the exact same frame ? If the PC gets hit, he loses health, if he dodges the "armor hit" sound doesn't play.

Still, if you use simple sound detection for this, using your exemple : the first dagger hit on a plate armored enemy would still do normal damage (if the script doesn't know you're fighting a plated ennemy yet) and the first hit on the next enemy would do nothing.
Also doesn't cover checking what type of weapon the player is being hit with in a fight (unless they have specific sounds ? no idea really).
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am


Return to III - Morrowind