Please or Register to create posts and topics.

Safe ceiling squat portals?

Page 1 of 3Next

I want to use a certain trick in my map that requires players to shoot a portal at a very low ceiling above them (just around crouch height) - we'll call this portal ORANGE.

If this is done, the player can cease crouching and stand up through the portal on the ceiling (assuming there is a linked BLUE one somewhere else).

While standing up through this ORANGE portal, the player is not effected by the gravity on the BLUE side. I.e. if the linked BLUE portal is placed on a ceiling or wall, the player will not fall out but can shoot in sort of a pseudo portal-in-portal which does not require the player to duck out of the portal before the connection is made.

I've already got a large number of puzzles planned that use this technique, but I've run into some problems. The main problem is that if the player shoots a new ORANGE portal somewhere else whilst standing up in the middle of it, the player can be sort of "teleported" or slightly moved (though not from a portal but rather the absence thereof).

If the ORANGE portal you're standing up through disappears, sometimes the game will lodge you in the ceiling (you'd have to noclip out), in some cases the game may choose to make you fall through the platform you're standing on, and other times it may teleport you above the platform you're on.

I've tried a number of methods to combat this, but I was wondering if anyone else had a fix to suggest.

1) Tried putting a trigger in the volume the player would get stuck in occasionally that would move the platforms, but the trigger would go off if a portal was placed on the adjacent surface and the player then used it. It also didn't seem like moving the platforms would properly dislodge the player every time.

2) Tried putting player clips above and below the crouch space.

If worse comes to worst, I think my only option will be to locate a stationary map-defined ORANGE portal in the ceiling of the crouch space that can be activated by pressing a button or something - and limit the player to the use of only the BLUE portal. This will take quite a bit of the challenge of the maps out, so I don't want to resort to this unless I have to. Another option would be to KILL the player if they become embedded, but it will take some trial-and-error to prevent it from killing players portal'ing on the adjacent surfaces.

So ... suggestions?

Is there a way to:

1) Detect when a portal is no longer on a surface? I know there's a way to detect when a portal first gets to one, but I can't find a way to detect when one disappears.

2) Force the player to crouch?

I want to say that there is a "point_clientcommand" that you can use with "+crouch" to make them crouch, but they will be forced to stay that way until you use another with "-crouch".

As for detecting portals, there is a way to do it, but I don't remember off the top of my head.

"Games are made out of smaller games ? turtles all the way down, until you hit the game that is so trivial and stupid it isn?t deserving of the name." --Raph Koster

On another topic we talked about blue-only and orange-only portal surfaces. We came to the conclusion they were useless and stopped thinking about it.
In fact you found the case where they are useful!

If the ceiling you go up in is orange-only and the point you have to shoot blue-only (or the opposite), your problem is solved (at least from what you said).
The only thing... I have no idea how to code it!

Thanks to Portal, someone's birthday is now the most feared day in the year...
NO! THE CAKE! NOOOOOOOO !

The command to force the player to crouch is actually "+duck".

Hyakkidouran wrote:
On another topic we talked about blue-only and orange-only portal surfaces. We came to the conclusion they were useless and stopped thinking about it.
In fact you found the case where they are useful!

If the ceiling you go up in is orange-only and the point you have to shoot blue-only (or the opposite), your problem is solved (at least from what you said).
The only thing... I have no idea how to code it!

His problem has nothing to do with the color of the portal. His solution for making sure that one of the portals does not disappear is to have one of the portal-halves permanently preexist (just like is done in the early levels of Portal when your gun could only shot blue, or something). Not the same thing (and the early levels of Portal would give examples of how to do it; its not too hard).

The movement when portalling is something you have to live with, IMO. I have a puzzle that uses this "feature" too; to keep from having them get stuck, try having them enter from an angled wall instead of crouching and standing in it (you are giving Portal no leeway in how to get you unstuck). Maybe have them stand on a cube to reach the angled wall. I think they'll get thrown out more, and not get stuck. I've not got stuck this way Avoiding getting lodged in the ceiling is the primary issue, after all. :)

xitooner wrote:
His problem has nothing to do with the color of the portal.

What Hyakkidouran is suggesting is to put an "orange-only" surface on the ceiling where I want players to squat. Then I'd have to design the level so the player could not see any "orange-only" portals using portal-in-portal - obviously you'd need to have more orange-only walls at some place in the level to make it more challenging than the stationary portal fix I had originally suggested. You might be able to rig a portal detector to somehow kill a portal in a given area OR ... and I don't know if this will work but it would probably be easier to manage ... open a stationary portal somewhere the player could not get to and then IMMEDIATELY deactivate it. The only thing that would remain is somehow letting the player know which portals could be placed on which walls. (preferably by using textures already in the game)

Standing on a cube could work. I'll have to try it. The only question is what would happen to the player if they put the cube through the portal to a place they couldn't reach.[/url]

K. I got one-portal walls working. Unfortunately there's a slight delay after you try to place a portal on an invalid wall - you cannot place it on a valid wall for a few seconds while the other portal is deactivated.

There might be a way to use something else to make the portal disappear, i.e. a fizzler or just some func_ that destroys all portals, but I'm not sure how you'd do that.

Hyakkidouran do you have a link to that other topic? I couldn't find it in searches. I don't think I'm doing anything groundbreaking here and I was wondering if someone in that topic had found a better way to do it.

xitooner wrote:
His problem has nothing to do with the color of the portal.

I know, but using the portal color might be a way to slove the problem more easily than with other solutions, even if it is technically a detour from the primary objective.
Now I am a newbie, so I have no idea what is actually easier to code, but I thought it might be worth it to suggest the option.

Corion => Seems like a minor drawback, especialy if you put a visual effect on the wall that somehow says "you made a mistake, I erase your portal now".
About the texture you should use, maybe concrete with a very blue/orange light over it should be enough to make the problem clear if the light is localized enough.
But recoloring textures with photoshop or gimp is easy, maybe you should go for that.

Thanks to Portal, someone's birthday is now the most feared day in the year...
NO! THE CAKE! NOOOOOOOO !
Hyakkidouran wrote:
But recoloring textures with photoshop or gimp is easy, maybe you should go for that.

I've done that in Unreal, but I'm clueless as to how to do it in Source - those little material text files kinda scare me. I do have the Noesis DVD and I'm fairly certain it says something about importing textures into your map at one point, so I'll check it out. I was thinking of something unintrusive, like recoloring the plastic textures used to frame glass to orange/blue and then framing a wall with it. Stick portal bumpers on them and voila! I think I'm going to have to build some puzzles exclusively around this mechanic, especially with a "teaching" map first.

Page 1 of 3Next