When I attached the script to the guard himself, it worked just fine, but when I put it into an ability, it stopped working.
scn RemoveLoneGuardBounty
Begin ScriptEffectStart
if isGuard == 0
;removes the ability if the actor is not a guard
removeSpell AbRemoveGuardBounty
endif
end
Begin OnDeath player
if player.isSctorDetected == 0
player.modCrimeGold -1000
endif
end
If anyone has any idea why this would stop working when applied as an Imperial ability, please let me know. I really don't want to have to apply this script to each guard individually. O_O
Edit: Ok, it seems that, although I added this to the Imperial race's abilities, it didn't get applied to anyone in that race. Once again, if you know why, please let me know.