You mean like with Ataraxis?
If so, look at the script for Top Floor SC, event #0303.
The game checks for a flag, and if it's set, jumps to the event specified - so if flag 1500 is set, it jumps to event 304. Else, it goes on.
Ataraxis's entity changes, a short cutscene, then changes again, with the flag set at the end.
... Or something like that. I didn't get my own explanation.
Seriously, though, it... can get tricky.