Right, well, I appear to have a scope problem here, where something can't see or edit a variable. Basically the code is as follows:
$current is set to "entrance" with the use of find_room()
do_action($current) is called. This does some logic and then prints.. eh, well, it's $objects[$_REQUEST["obj"]]->results[$actnum], but suffice it to say that it's a string.
The string, in this case, is just "..." . do_portal() . "..."
do_portal() does this:
global $current;
$current = "maze1";
return;
But $current doesn't get set globally. do_action knows what $current is all the time, and as far as it knows, it remains constant while it calls the string. The string doesn't know what $current is at all, before it is set via do_portal(), and $current doesn't exist as far as do_portal() knows either. The string knows that $current is changed by do_portal().
Make sense? Need more information and/or clarification? Better still, know any way of fixing it? Oh. Fine then.