So, if you define your state scripts in the object itself rather than in a global state, it will work. If you are feeling crazy you could even write the state script right there were you create the state. Like this:
truestate_state_create(STATE_STAND, function(_event) {
switch(_event){
case TRUESTATE_NEW: break;
case TRUESTATE_STEP: break;
case TRUESTATE_DRAW: break;
}
}
etc. But all that really matters is that the function you reference isn't a "global" function.