Portals on moving surfaces

Posted Nov 16, 2012
Replied 3 days later

BenVlodgi wrote:
...
you should do this on the map startup
sv_cheats 1
allow mobile portals
sv_cheats 0
...

Actually, it needs to be "sv_allow_mobile_portals 1" without the quotation marks. If you simply enter the command it won't do anything. Cheat codes in Portal 2 are variables that have to be set to something. In this case, it is a Boolean that needs to be set to 1 or 0. When it is set to 1, you CAN have portals move. The default is to have it set to 0, which means that you can NOT have moving portals.

Advertisement
Registered users don’t see ads! Register now!
Posted Nov 16, 2012
Replied 7 hours later
Old thread, everyone!
Posted Nov 16, 2012
Replied 1 hour later

protoborg wrote:
BenVlodgi wrote:

...
you should do this on the map startup
sv_cheats 1
allow mobile portals
sv_cheats 0
...

Actually, it needs to be "sv_allow_mobile_portals 1" without the quotation marks. If you simply enter the command it won't do anything. Cheat codes in Portal 2 are variables that have to be set to something. In this case, it is a Boolean that needs to be set to 1 or 0. When it is set to 1, you CAN have portals move. The default is to have it set to 0, which means that you can NOT have moving portals.

I know, but when I posted it I didn't feel like looking up the actual command

Posted Feb 01, 2013
Replied 2 months later
Is there no way to hardcode a custom map so the cheat codes dont appear on screen?
Avatar
973 Posts
Posted Feb 01, 2013
Replied 1 hour later
Just enable cheats real quick and disable, unless it is coop, then that won't work. I had to turn on developer mode for a few seconds in my gravity gun map, nothing too noticeable happened in that time.
Posted Feb 01, 2013
Replied 27 minutes later
I already have that in place, but that yellow message always presents itself in the bottom left corner.
Posted Feb 01, 2013
Replied 6 hours later
There's a command that I can never remember the name of, I think it's hud_saytime, which controls how long the yellow text appears for.
Posted Feb 01, 2013
Replied 13 hours later
got it!! So for future referance to anyone

LOGIC_AUTO
onmapspawn - @command - command - sv_cheats 1
onmapspawn - @command - command - hud_saytext_time 0
onmapspawn - @command - command - sv_allow_mobile_portals 1
onmapspawn - @command - command - sv_cheats 0

make sure to separate the 'cheat' outputs by a microsecond from the 'saytext' and 'mobileportal' lines so they can take effect

Avatar
97 Posts
Posted Feb 01, 2013
Replied 23 minutes later
You can also write that in one output:
OnMapSpawn - @command - Commmand - sv_cheats 1; hud_saytext_time 0; sv_allow_mobile_portals 1; sv_cheats 0
This way you don't need to worry about delays.
Posted Feb 01, 2013
Replied 7 minutes later
i didnt know you could add that many lines in a single command 0_o
Posted Aug 22, 2013
Replied 6 months later
sorry to double post but i have noticed that this cheat overrides the portal being fizzled on contact with a portal cleanser. I have an area where the panels go that the player shouldn't, but they are fully able and i need to stop that somehow
Avatar
630 Posts
Posted Aug 22, 2013
Replied 5 hours later
Also when you turn off Cheats, you would still get no achievments in the actual session.
Posted Aug 22, 2013
Replied 4 hours later
As far as I know it works with every command, but I'm not sure.

There may be a problem that I had one time in a map that requiered a cheat-command: I died, and after reloading the save, the command was gone, but it wasn't set again, so the map was unsolveable without starting at the very beginning, because there was no way to find out what the command was. :/

Posted Aug 22, 2013
Replied 3 hours later

Fracture wrote:
sorry to double post but i have noticed that this cheat overrides the portal being fizzled on contact with a portal cleanser. I have an area where the panels go that the player shouldn't, but they are fully able and i need to stop that somehow

Make a trigger to detect prop_portals and OnStartTouch !activator Fizzle.

Posted Aug 22, 2013
Replied 3 hours later
will that work with a portal_detector and normal portals?
Posted Aug 22, 2013
Replied 1 hour later
It should. But I was imagining a simple trigger_multiple with a filter_activator_class set to prop_portal.
Advertisement
Registered users don’t see ads! Register now!
Posted Aug 23, 2013
Replied 3 hours later
i will try them both and see what happens.

Edit: portal_detector works for fizzling. honestly wasn't expecting that to work