Script no work, but no errors + same as working 1?

Post » Sat Apr 06, 2013 8:20 pm

Wow is it just me are are the number of characters allowed in titles extremely short from what they were before?

So anyways I've run into a problem that has me totally stumped. My blocking script doesn't work. At all. Absolutely anything in the script fails to register or do anything. Despite this... zero compile errors, yet it's hooked up and formatted exactly like my other scripts which DO work perfectly fine. So why doesn't my block script work? Does it have anything to do with the update (i've not touched my mod for a couple of months now, but I'm working on it again)? Does it have to do with some arbitrary, unlisted limit on the number of scripts that can run on a single actor? I don't know. I'm stumpped. Here's my script, so far:

At the moment, all I'm trying to do is get it so CPO_PlayerHasHeavyShield returns "1" when the player equips a heavy shield in-game, but no matter what I do it always returns zero. This isn't a super complicated script and its formatted exactly like my other scripts which work fine (but don't focus on shields). I've ommited parts of the script that aren't being used yet (commented out for debugging purposes) so that's why there's a lot of declared stuff that isn't showing up in the script itself.

Scriptname CPO_PlayerSkillsBL extends ReferenceAlias;***********************************************************;BLOCK MASTER SCRIPT;***********************************************************actor PlayerRefKeyword Property ArmorShield AutoKeyword Property ArmorHeavy AutoPerk Property CPO_BL_BlockSkillGlobalHeavy AutoSpell Property CPO_BL_HeavyShieldStabilityDamage AutoSpell Property CPO_StaggerSpellForPowerattack AutoFaction Property ForceFullBodyStagger AutoGlobalVariable Property CPO_PlayerHasHeavyShield Autobool ShieldIsHeavybool ShieldIsLightbool ShieldIsWeaponEvent OnInit()PlayerRef = Game.GetPlayer()ShieldIsHeavy = falseShieldIsLight = falseShieldIsWeapon = falseendEventEvent OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)if akBaseObject As Armor  if (akBaseObject As Armor).HasKeyword(ArmorShield) && (akBaseObject As Armor).HasKeyword(ArmorHeavy)   PlayerRef.RemovePerk(CPO_BL_BlockSkillGlobalHeavy)   ShieldIsHeavy = false   CPO_PlayerHasHeavyShield.SetValue(1)  endifendifendEventEvent OnObjectEquipped(Form akBaseObject, ObjectReference akReference)if akBaseObject As Armor  if (akBaseObject As Armor).HasKeyword(ArmorShield) && (akBaseObject As Armor).HasKeyword(ArmorHeavy)   PlayerRef.AddPerk(CPO_BL_BlockSkillGlobalHeavy)   ShieldIsHeavy = true   CPO_PlayerHasHeavyShield.SetValue(1)  endifendifendEvent

The funny thing is, I'm copying the exact same format and it's hooked up in the exact same way (the script is attached to the reference alias via a quest - the reference alias being the player) as about 5-6 or so other scripts that do similar things but with different goals (i.e. one focusing on Heavy Armor instead of blocking. And those scripts work, and continue to work, perfectly fine in testing.
User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am

Return to V - Skyrim