I want to set staff state as EscortPatient when the staff escort patient tstaff state.fsmo exit.
You can manually set the state of the staff by using a line of code like this:
patient.Staff.stats.state("HC States").value = "EscortPatient";
The bigger issue is that as soon as the staff starts walking he sets his own state to InTransit so it will just get overwritten if you set it before the Escort Patient activity. One thing you could do is wait a couple seconds after the Escort Patient activity starts before setting the staff's state.
18 People are following this question.