Areaportal Error

Cold

L1: Registered
May 23, 2009
31
5
I have placed areaportals inside my func_doors. When I try to load my map in TF2 it closes out and I get an engine error that says portalnum > numareaportal or something similar.

Does anyone know what would cause this?
 

Altaco

L420: High Member
Jul 3, 2008
484
120
map -> load pointfile. Your areaportals have to seal off an area entirely.
 

HojoTheGreat

L5: Dapper Member
Nov 11, 2008
206
34
What both guys above say is correct, but to give you a more thorough method of fixing it:

  1. In Visgroups, turn off everything but world geometry. That means turning off props, func_details, lights, etc. Basically anything that will obscure your view of the map, and that does not seal a room.
  2. Run map using Normal BSP, no VIS and no RAD. Make sure Do not run map in game is checked (you do not want TF2 to launch)
  3. Click Map, Load Pointfile (about halfway down the menu)
  4. A red line should appear if you have a leak. With areaportals this line will show you how the two faces of an areaportal are connected/touching. Start at one side of the areaportal and follow the red line all the way until you see where the leak is (usually two brushes not fully touching, or a previously func_detailed brush.
  5. Seal the leak, the repeat steps 2-4 until no Pointfile can be loaded.

Congratulations, you've fixed your leaks!
A couple things to note, first, use the SKIP texture on all of the faces that are not being used as Areaportals on an areaportal brush for maximum efficiency.
Also, don't forget to turn your Visgroups back on before doing a more thorough compile!
 

Cold

L1: Registered
May 23, 2009
31
5
Thanks for the quick pointers. The map now loads properly. But it seems they made my fps lower than before. Does that mean I used them improperly? I only put them in doorways to the base.
 

Armadillo of Doom

Group Founder, Lover of Pie
aa
Oct 25, 2007
949
1,228
How many are you using, exactly? While portals can be very beneficial, they can also quickly become expensive. The main difference between portals and hints is that the former will also block the rendering of entities. As such, it should be used selectively.
 

Cold

L1: Registered
May 23, 2009
31
5
There are 5 on the bottom floor and 5 on the top floor. Does that mean it would actually be a better idea for me to remove them if they are that numerous?
 

Armadillo of Doom

Group Founder, Lover of Pie
aa
Oct 25, 2007
949
1,228
There are 5 on the bottom floor and 5 on the top floor. Does that mean it would actually be a better idea for me to remove them if they are that numerous?

Definitely. That many portals in such a small space is not doing anything good for your map. Think of it this way; portals should only be used to separate main areas. So those 3 blocks which you spoke of earlier? The entrances between those blocks would be good places to stick a portal. But unless it's going to block a significant portion of the geometry and models, you'd be better off using hints. Edit 1: I think you'll find this useful; http://forums.tf2maps.net/showthread.php?t=359
 
Last edited: