In LSL, the state command should have an immediate effect.
The OpenSim script engine seems to wait until the function
ends to process the state transition.
"First stage in a major Script Engine refactor, that will result in the LSL implementaions ebing reconverged. Not there yet, but one major part is done."
Thank you, Melanie!