Scriptname BladesArmorMonitor extends Quest ConditionalMessage Property pMessage1 Auto ConditionalMessage Property pMessage2 Auto ConditionalKeyword Property pArmor Auto ConditionalPerk Property pPerk Auto ConditionalQuest Property QSTBladesArmorMonitor Auto Conditionalevent OnInit() ArmorCounted() pMessage1.Show()endEventFunction ArmorCounted() float CurrentCount = Game.GetPlayer().GetItemCount(pArmor) if CurrentCount >= 1 Game.GetPlayer().AddPerk(pPerk) pMessage2.Show() GotoState("Done") endifendFunctionThat's the script I'm currently working on. When the player picks up one of a group of specific objects, I want him to automatically gain the perk required to craft more of those objects.
But ArmorCounted isn't firing properly. If I'm right in my scripting- and it's entirely possible I'm horribly, horribly wrong- my OnInit block (which IS firing properly, I scripted a debug message in to be sure) should be immediately firing my ArmorCounted block. But when I get an object with the proper keyword (which is set by properties, a new favorite feature of mine), I never get the second debug message, and I know the perk isn't added.
Any clue what's wrong, better programmers?
