Please or Register to create posts and topics.

Lua in portal 2?

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?

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.

oh my god please HELP ME

please

Optical is right, the VDC page is wrong. The only scripting language available in Portal 2 is Squirrel (aka VScript).

Falsi sumus crusto!

Technically Portal 2 does use lua, but only for menus and such; it won't work as a triggerable script.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

That still sounds interesting to me. Can you elaborate?

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.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

I see those. That's some very neat stuff actually!

Code: Select all
-- 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!