More precisely the logic would be written as follows:

Code
If(_Trigger != null){
  TeleportTo(_Player,_Trigger,"",0);
}

if (_Trigger == null){
  TeleportTo(_Player,_Mirror,"",0);
}


Now I know that the results would ultimately be the same between the two ways of writing it, but I think it's important to write it out the way that Osiris actually executes so that you don't get caught with some subtle problems in the future. You had two things a little off that could be highlighted.

First, your condition was reversed. The check for non-null occurs first and the check for null occurs second.

Secondly, the second PROC frame is not an "else". Both frames are going to get executed every time. Osiris will not skip the second frame of an identically named PROC just because the first check succeeded. It just so happens in this case that both PROC frames cannot be true at the same time, but that may not be the case in other procedures. In fact, Larian makes pretty frequent use of identically named PROCs where they expect both to execute but stagger them for different reasons related to timing or acting on some output from the previous frame.



DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods