ScriptName ArmorSizeIncreaseSCRBegin OnEquip SetScale 1.2EndBegin OnUnequip SetScale 1.0End
SetScale; Instead ofSelf.SetScaleUsing http://geck.gamesas.com/index.php/GetSelf needlessly will just make a script slower and make it break if it's run on a dynamically created reference, as http://geck.gamesas.com/index.php/GetSelf seems to return 0 when called on references stored in the save game (such as those created via http://geck.gamesas.com/index.php/PlaceAtMe, or dropped from the player's inventory).
begin GameMode if player.isSneaking == 1 if DoOnce == 0 playsound Cloak set DoOnce to 1 endif elseif player.IsSneaking == 0 if DoOnce == 1 set DoOnce to 0 endifend
Begin ScriptEffectStart player PlaySound CloakEndThe same concept applies for running code when armour is equipped or unequipped to change the player's scale:
Begin ScriptEffectStart SetScale 1.2EndBegin ScriptEffectFinish SetScale 1End
int bSneakingBegin GameMode if player.IsSneaking != bSneaking set bSneaking to player.IsSneaking if bSneaking PlaySound Cloak endif endifEndIf the item can be in an inventory without being equipped by the player, you'll need extra checks for that as well.