Lua in portal 2?
Quote from da1 on March 15, 2014, 11:19 amAccording 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?
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?
Quote from opticalprocessor on March 15, 2014, 11:33 amNo, 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.
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.
please
Quote from FelixGriffin on March 15, 2014, 6:32 pmOptical is right, the VDC page is wrong. The only scripting language available in Portal 2 is Squirrel (aka VScript).
Optical is right, the VDC page is wrong. The only scripting language available in Portal 2 is Squirrel (aka VScript).
Quote from CamBen on March 16, 2014, 3:27 amTechnically Portal 2 does use lua, but only for menus and such; it won't work as a triggerable script.
Technically Portal 2 does use lua, but only for menus and such; it won't work as a triggerable script.
Aperture Science: We do our science asbestos we can!
Quote from CamBen on March 16, 2014, 2:05 pmI'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.
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.
Aperture Science: We do our science asbestos we can!
Quote from da1 on March 16, 2014, 3:48 pmI 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!
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!