I'm having trouble scripting a minimum skill requirement for Energy Weapons. I've been able to do this just fine with other types of weapons, by using GetWeaponAnimType, in a quest script. But energy weapons is not a separate category.
So I looked at the FOSE commands and found the GetWeaponType command, which has type 4 (OneHandPistolEnergy) and type 7 (TwoHandRifleEnergy), so I thought I was all set.
But I cannot seem to get this to work. I'm guessing that I'm missing some little piece of information again (of that I'm doing this all wrong).
Begin GameMode if player.GetActorValue EnergyWeapons < 25 && (Player.GetWeaponType == 4 || Player.GetWeaponType == 7) DisablePlayerControls 0 0 1 0 0 Endif if player.GetActorValue EnergyWeapons >= 25 || (Player.GetWeaponType != 4 && Player.GetWeaponType != 7) EnablePlayerControls 1 1 1 1 1 1 1 EndifEnd