Garry's Mod

Garry's Mod

gm_indoorspaces
QuantumDylan  [developer] 28 Jul @ 12:44pm
Cinema Mod Integration
Hello there! So my latest update brought with it the components necessary to use one of the theater screens to share youtube or whatever else the fixed Cinema mod can load! However, gmod doesn't like packed lua files in maps it seems, so I'm going to put the contents of the lua file necessary for operation here. Simply copy these into a blank file and save it as gm_indoorspaces.lua in the directory (gmod directory)/garrysmod/lua/autorun and you should be able to run the map with full Cinema support!

gm_indoorspaces.lua
hook.Add( "InitPostEntity", "gm_indoorspaces", function() if !Location then return end Location.Add( "gm_indoorspaces", { [ "West Theater" ] = { Min = Vector( 4728, 2960, 296 ), Max = Vector( 5512, 4288, 640 ), } , } ) end )

This code tells the Cinema addon that there is one region on the map defined by the min and max vectors (bounding rectangle formed from both points) and that it should reference a "West Theater". Originally I was going to try and have both screens be functional, but no matter what I did I could not get more than the one screen to work. Oh well!

Add this into your autorun and reload the map, if you're playing multiplayer be sure they also put this file in. If I can figure out a way to get this working while packed I'll remove this discussion!