OnPCHitMe registering when it shouldn't

Post » Sun Feb 10, 2013 11:01 pm

I'm having an odd problem with a few scripts that rely on triggering different forcegreetings on a character if you mess with stuff in the area the character is guarding. I scripted several items to trigger a local forcegreeting variable. I have a separate check for OnPCHitMe on the character if he gets attacked.

This is the script I put on the object. NOTE: the object has NO ownership assigned.

Begin Uvi_Berom_SkullScriptIf ( MenuMode )    ReturnEndifIf ( OnActivate )    Set uvi_skeleton_baerrae.FGS to 1EndifEnd

This script is triggering OnPCHitMe on the NPC, and setting off a completely different forcegreeting (FGS 99).

Here's the NPC's script:

Begin Uvi_Berom_Skellington;FGS STATES:;1 - Poking the skulls;2 - Prodding in his coffin;3 - Prying open the votive chestShort noLoreShort AddOnceShort OnPCHitMeShort FGS ;forcegreeting dialogue checkShort BeenTold ;dialogue check for skull pokingShort BeenTold2 ;dialogue check for coffin proddingShort BeenTold3 ;dialogue check for chest pryingShort FezInfo ;dialogue checkIf ( MenuMode )    ReturnElseif ( CellChanged )    ReturnEndifIf ( AddOnce == 0 )    AddTopic "So, what's with the hat?"    Set AddOnce to 1EndifIf ( HasItemEquipped FEZ == 0 )    Equip FEZEndifIf ( OnPCHitMe )    Set FGS to 99    Set OnPCHitMe to 0    StartScript Uvi_Berom_Exile    ReturnEndifIf ( GetSoundPlaying "Open Lock" == 1 )    Set FGS to 3Elseif ( GetSoundPlaying "Open Lock Fail" == 1 )    Set FGS to 3EndifIf ( FGS > 0 )    ForceGreetingEndifEnd

So, why is this happening, and how do I make it stop?
User avatar
Sunnii Bebiieh
 
Posts: 3454
Joined: Wed Apr 11, 2007 7:57 pm

Return to III - Morrowind