Add an SDK component that disallows portals being placed in certain areas
EksCelle
I would like an SDK component that doesn't allow portals to be placed in certain areas while they can in others.
Maybe something like Team Fortress 2's func_nobuild, a trigger area that disallows Engineer buildings from being built inside the trigger https://developer.valvesoftware.com/wiki/Func_nobuild
This would allow world creators to limit what areas portals can be placed, rather than disabling them outright like we can currently. A use case example would be game worlds with a separate lobby from the game area, where users can place a portal in the lobby, but not in the game area where the portal could be used maliciously.
Log In
Deantwo
The biggest issue I see with this feature, would be UI/UX when placing the portal. If you aren't allowed to place the portal in one of these zones, how would it be communicated to the user?
Currently if you try to place it in a spawn area, it just tells you you can't place it there. But if these zones are suddenly very big, it might confuse players a lot more.
Either the world creator should be able to attach a small text, explaining to the user where they can place the portal. Such as: "Portals can only be place in the lobby area." The main issue would that would be localization, since we can't expect a world creator to know all the supported languages.
Or the world creator could define coordinates (or a reference object) that an arrow will then point the user towards as a simply way of saying "you can place the portal in this direction."
EksCelle
Deantwo I feel like the existing effect of not being able to place a portal does a good job of telling a player that a portal cannot be placed in an area.
I think adding a text option would be a great idea. By default it could say "Portals cannot be placed in this area" but it could be changed to whatever the world creator likes. If localization is an issue then not having the option for world creators to edit the text would be fine too.
Localization is a concern but considering that currently existing tooltips on interactable objects in worlds already don't have any localization I don't think it will be a problem. The big red "X" when trying to place a portal should be enough of a visual identifier that a portal can't be placed in an area. Using Team Fortress 2 as an example again, when in a non-buildable area, the Engineer's buildings just become a big red "X" with no tooltip saying you can't build in this area and it gets the message across well enough.
Deantwo
Maybe some options on the zone would be useful too. Like allow us to designate a zone to only allow "Locked Portals".
I think the Locked Portal feature is still very odd, since it is a bit unintuitive. But for game worlds where you might have private little home areas, creating a portal for just you and a friend might be better than an "unlocked" portal which could be maliciously placed.
Would also be useful if the zone could be set to allow the instance owner to still place portals.