Please or Register to create posts and topics.

Detecting no portals placed

How do you detect if the player has not got any portals placed?

There's a place in my map where the player can trap themselves if they've not placed portals outside. So I need a way to open an escape hatch if this happens.

Must be possible because it happens in a few places in the game.

There is a func_portal_detector, that you could put around your entire map (or at least, all areas reachable from this specific area), and then you could put another trigger in the room/pit/whatever to check and see if there are no portals detected.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I'd try to avoid this at all costs. It's never very fun getting "stuck" in a chamber and having glados let you out; it really breaks the flow of puzzle solving.

That being said, there are a handful of sp levels that include this mechanic and it works just fine.

Meybe you can reverse the problem: Can you detect that the player has placed all of its portals inside, and can you guarantee that the player must have had placed at least two portals to have access to that room (in order to exclude the "no portals" exception)?

Made Logic Portals in early 2008. Making diportals in 2011.
Author of Minecraft mods (MAtmos, Minaptics, NoteSlider) and Garry's Mod addons (Gunstrumental, SharpeYe, GarryWare, DepthHUD).

I couldn't get the detection thing working, wasn't sure what outputs to use on the func_portal_detector.

I've got a workaround for now so it's not major problem.

If anyones got a tutorial or example I'd like to see it though.