Lua in portal 2?

Avatar
da1
10 Posts
Posted Mar 15, 2014
According to this page from developer.valvesoftware Portal 2 have a built-in Lua suppot (albeit a clientside-only one). Since right now I'm doing some stuff that relies heavly on logic_script stuff, I thought that it would be fun to check out what is this all about. Exept that, other then on that one page, I can't find any reference to this fact at all. No documentation, nothing. Anyone can confirm that lua in P2 is actually a thing?
Advertisement
Registered users don't see ads! Register now!
Avatar
opticalprocessor
88 Posts
Posted Mar 15, 2014
Replied 14 minutes later
No, as far I know the only scripting language in Portal 2 is VScript.

Lua is only used in Garry's Mod and even then, it's HEAVILY modified.

Avatar
FelixGriffin
2,680 Posts
Posted Mar 15, 2014
Replied 6 hours later
Optical is right, the VDC page is wrong. The only scripting language available in Portal 2 is Squirrel (aka VScript).
Avatar
CamBen
973 Posts
Posted Mar 16, 2014
Replied 8 hours later
Technically Portal 2 does use lua, but only for menus and such; it won't work as a triggerable script.
Avatar
da1
10 Posts
Posted Mar 16, 2014
Replied 5 hours later
That still sounds interesting to me. Can you elaborate?
Avatar
CamBen
973 Posts
Posted Mar 16, 2014
Replied 5 hours later
I've found some lua files in the scripts folder subfolders, you can open them if you want, but they pretty much don't control gameplay, they just say how the menu acts when buttons are clicked and stuff.
Advertisement
Registered users don't see ads! Register now!
Avatar
da1
10 Posts
Posted Mar 16, 2014
Replied 1 hour later
I see those. That's some very neat stuff actually!

-- below is some test code with session commands
   c:Nugget( "use:sessions:CreateSession", {
         system = {
            network = "offline"
         },
         game = {
            map = "devtest"
         }
      } )

I imagine that those could be used for making more customized main menu for mods, so we wouldn't have to mess around with extras.txt in order to run maps anymore.

Unless they are just unfunctional leftovers like most of the stuff realating to GUI in P2 files... Exept that there are no other Valve games that use this system (except for Dota 2 which was relased two years later). Dunno, I need to check this out.

Thanks for reply anyway!