Controlling portals

From Valve Developer Community
Jump to: navigation, search
English (en)français (fr)русский (ru)中文 (zh)
Edit
Portal Level Creation

Controlling portals is the basis for nearly any puzzle-based Portal map. If your player can create portals anywhere, most puzzles become trivial and not fun. The following suggestions aim at forcing players into using portals on specific areas and also how to help them control their portals.

Textures

Portals cannot be made on textures which have "%noportal" 1 in their .vmt file. For the default Portal texture set, most textures that are concrete are portal-enabled while metal ones are not. This is the main way to prevent players from putting a portal on a wall.

func_noportal_volume

This brush entity stops any portals from being made within it. To create one, just cover an area you wish to disallow portals (like the ceiling and floors of an elevator room) in a brush textured with tools/toolsinvisible and tie it to the entity.

func_portal_bumper

This brush entity is used on the edges between portal-enabled and portal-disabled textures. If the player shoots their portal not fully onto the portal-enabled surface, this entity will "bump" it so the portal is fully on the portal-enabled surface. To create one, create a brush just in front of the edge where the two surfaces meet, cover it with the texture tools/toolsinvisible and tie it to the entity.

trigger_portal_cleanser

When a player passes through this trigger, their portals will be erased. It can also be set to dissolve any physics objects (like cubes, spheres or cameras). To create one, make a brush across the area where you want it to trigger, apply the tools/toolstrigger texture to it and tie it to the entity. This is mainly used when creating a portal/object fizzler.

func_portal_orientation

This brush entity rotates portals based in it's volume so they are always facing a certain direction. To create one, make a brush textured with tools/toolsinvisible and tie it to the entity. Then set the AnglesToFace value to whichever direction you want the bottom of the portal facing.

See also