Hi, I am trying to write a script that will detect the correct level of perk rank and have run into a wall. The function HasPerk will only reply with either a 0 or a 1 if done with a script; therefore, I have been looking for another way of detecting perk ranks.
I decided on two different methods that both work. One method would be to add a hidden Ability to the perk that does nothing other than being there to be detected by the script via IsSpellTarget. The second method would be to add a hidden ability that will change a global variable, which will then be detected by the script. Both of these methods work wonderfully; however, there is a problem.
Both of these methods don't activate if the player already has the perk. It only activates when the player recieves the perk. For example, the perk i wish to detect ranks for is Demolition Expert. New players will have the script detect the ranks just fine; however, players with a save that already has demoliton expert will not activate or have the ability added until another rank of the perk is recieved. This is a problem for players that already have 3 ranks of the perk. Anyone have any idea how to circumvent this problem? Any help would be appreciated.