finally, I did it and it works just the way I want… What? Here…
This gate ( read about the gate itself here: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&p=108735#108735 ) leads into this tunnel. And I somehow needed to use an areaportal there with my script_mover gate so I could cut the 2 areas with my gate. Alas, I found out an area portal will only work with a door entity, those being damn func_door and func_door_rotating.
As I told somewhere above, the closest I got to that was by putting an invisible func_door inside my script_mover gate, and have it triggered by the very same switch which controls the gate. No scripting for the func_door since I didn’t really know what command I could use at all with a door entity. Doing this proved half-efficient. When the map loaded, gate is closed by default and so is the func_door. When I hit the switch, as the gate and the func_door opens, area portal loads the next area nicely. BUT after than, I would either have it open forever so even when the gate is closed, the area beyond it would be visible by the engine; or for worse, the func_door would close itself and I’d get the HOM
Now, many many thanks to carnage, I learned this magic command “alertentity”. How could I know that there would be such a command! Bliss Bliss and Heaven!
Again I made an invisible func_door the size of my gate, gave it a scriptname and targetname of fdoor, and set its speed to überspeed!. And put the blissfull code below into my script.
fdoor
{
spawn
{
}
trigger doitdammit
{
alertentity fdoor
}
}
And I put 3 lines “trigger fdoor doitdammit” to 2 places
1 to just before the gates is triggered to open (gotomarker path_corner N), so justbefore the gate will open, the area portal will load the next area.
1 to just after the gate is triggered to close and wait (gotohell god_dammit M), so just after the gate is closed, the area portal will unload the next area.
And put the last one into the script_mover gate’s spawn, otherwise it would be buggy and would not work right when the map is first loaded and would screw the whole area portal sequence.
So, now, when my gate’s closed, I have an operational teamdoor on it and opening this door will load the next area, and when my gate’s open, the next area is already loaded and it all works like a charm without any bug. What a blissfull day! Thank you all who helped.
EDIT: It’s buggy. It won’t work exactly right during the opening routine. or script, or whatever it’s called.