Ah, well rusty valve is a bit of a weird prop, so that approach won't work. The valve is actually a multi-body prop with a breakable joint. If you want to break the joint without the player touching the valve, all you need to do is apply a small impulse to the valve, and that will break the joint (You can also use BreakJoint - but you'd still need an impulse otherwise the wheel won't fall off the valve).
The following code assumes you have an area called ScriptArea_BreakValve, which if the player enters breaks the valve.
void OnStart()
{
// The rest of your OnStart() event \\
//Add a collision callback between the player and the area which breaks the valve
AddEntityCollideCallback("Player","ScriptArea_BreakValve","cbCollide_PlayerValveBreakArea",true,1);
}
void YourCheckPoint(string &in asName, int alCount)
{
// The rest of your Checkpoint code (Spawining the valves etc) \\
//Re-Add a collision callback between the player and the area which breaks the valve
AddEntityCollideCallback("Player","ScriptArea_BreakValve","cbCollide_PlayerValveBreakArea",true,1);
}
//This Callback is called when the player walks in an area to break the valve
void cbCollide_PlayerValveBreakArea(string &in asParent, string &in asChild, int alState)
{
//Get the current valve's name:
string valveName = GetLocalVarString("CurrentValvename");
//Because the valve is implemented by an incredibly weak breakable joint
//We can just apply a small impulse to the valve to break it, as well as make the wheel fall off
//If you want the wheel to rotate or tumble or something, adjust the values below
AddPropImpulse(valveName,0,0,0.5f,"local");
}