Skip to content
sk89q edited this page Aug 16, 2010 · 1 revision

Screens are what the videos and such are shown on. By default, four screens come defined with PlayX, with two of them being a projector. Projectors project a screen away from the entity onto a surface.

Defining Screens

The global variable named PlayXScreens contains a table of screens, with the key of every entry being the name of the model, and the value of each entity being another table defining particular parameters for that screen. The parameters are:

  • Offset: Offset from the center of the screen, defining the placement of the screen.
  • Width: Width of the screen.
  • Height: Height of the screen.
  • RotateAroundRight: Whether the screen should be rotated around the right vector of the model.
  • RotateAroundUp: Whether the screen should be rotated around the up vector of the model.

To see an example, see the list of default screens below.

Adding to the List of Screens

The list of screens is defined in PlayX/lua/entities/gmod_playx/shared.lua, so you may modify that file directly, or the preferred way is to modify the global table named PlayXScreens.

The default list of screens is:

PlayXScreens = {
    ["models/props/cs_assault/billboard.mdl"] = {
        ["Offset"] = Vector(1, -110.5, 57.5),
        ["Width"] = 221,
        ["Height"] = 115,
        ["RotateAroundRight"] = true,
        ["RotateAroundUp"] = true,
    },
    ["models/props/cs_office/tv_plasma.mdl"] = {
        ["Offset"] = Vector(6.2, -28, 36),
        ["Width"] = 56,
        ["Height"] = 33.5,    
        ["RotateAroundRight"] = true,
        ["RotateAroundUp"] = true,
    },
    ["models/props_bts/projector.mdl"] = {
        ["IsProjector"] = true,
        ["Forward"] = 0,
        ["Right"] = 1,    
        ["Up"] = 0,
    },
    ["models/dav0r/camera.mdl"] = {
        ["IsProjector"] = true,
        ["Forward"] = 1,
        ["Right"] = 0,    
        ["Up"] = 0,
    },
}

Clone this wiki locally