Yes, you will need scripting for this. But it is fairly simply, if you begin by making a script file as on the wiki in the first step in the script tutorial 1. Then you only have to do 1 thing in the script and 1 thing in the editor.
In the editor, select the lever, click the Entity tab. For ConnectionStateChangeCallback enter a name for a function, like PullLever
Then in the script file, anywhere that is not within OnStart, OnEnter or OnLeave you add
//Function as you specified in ConnectionStateChangeCallback
void PullLever(string &in asEntity, int alState)
{
//If the lever is pulled max up or down then give sanity damage
if(alState == 1 or alState == -1)
{
GiveSanityDamage(10, true); //10 = amount of damage, true = effects are used (vision distorts and such)
}
}
I think this will work, this is not the 100% intended use of ConnectionStateChangeCallback, but I think I used it like this in one of the levels. As you say 0 experience, to make sure you are not confused, all the lines that start with // are comments I added to explain what is going on, those do not actually have to be in the script.