Workaround for OnCombatStateChanged() ?

Post » Fri Nov 16, 2012 9:34 pm

I want to know when the player entered combat and left combat.

A self script with OnCombatStateChanged() does not seem to work on the player.
So I attach a script to the player monitoring his combat state every 0.1 seconds. But this seems heavy and awkward.

Any nice workaround for this?
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Sat Nov 17, 2012 9:43 am

Why not use the isincombat condition that is already on things like spells?

It will only update once each second but that should work for you just to know if the player is in combat or not.

I want to know when the player entered combat and left combat.

A self script with OnCombatStateChanged() does not seem to work on the player.
So I attach a script to the player monitoring his combat state every 0.1 seconds. But this seems heavy and awkward.

Any nice workaround for this?
User avatar
NIloufar Emporio
 
Posts: 3366
Joined: Tue Dec 19, 2006 6:18 pm


Return to V - Skyrim