vgui_slideshow_display

From Source Entities
Jump to navigation Jump to search
Portal screen.png

Code classes:

vgui_slideshow_display is a point entity present in all Source games. It shows images in a slideshow.

Note: The slides.txt file present in the slideshow folder from Portal is not necessary; it's only used on Xbox.

Caveats[edit | edit source]

  • Place it in the lower left corner of where you want the screen and rotate it so that the yellow line points which way you want the screen to face.
  • The entity has up to 16 "sub-lists" that it can randomly choose from before selecting which picture to show from a certain list. One list consists of every image in Image Directory, and others are created by specifying a keyword from the vmt in the parameter of AddSlides. For example, if a single image is added via AddSlides, the entity will show that image 50% of the time, and all others 50% of the time, collectively.
  • The same list can be added multiple times to weight which slides are more common. So you could add "cow", "cow", "cow", "chicken" and you'll be 3 times more likely to see a cow in the shuffle than a chicken.
  • Setting the Cycle Type to Forward will display all the added images in order by keyword (in the order that the keywords were added), then in alphabetical order for each slide in the keyword.
  • All randomness is done clientside, so two players may not necessarily see the same thing.

Keyvalues[edit | edit source]

Display Text (displaytext) <string>
Does nothing.
Image Directory (materials/vgui/...) (directory) <string>
A subfolder of materials/vgui/ to take images from. E.g. slideshow/glados from Portal. Subdirectories of the specified one will not be included.
Min Slide Time (minslidetime) <float>
Minimum amount of time to display a slide for.
Max Slide Time (maxslidetime) <float>
Maximum amount of time to display a slide for.
Cycle Type (cycletype) <choices>
How to progress through the images.
  • 0: Random
  • 1: Forward
  • 2: Backward
No List Repeat (nolistrepeat) <choices>
If Cycle Type is random, should the entity let the same image appear multiple times before it's gone through every single one?
  • 0: Allow List Repeats
  • 1: No List Repeats (skips to the next unused frame on the list)
Panel width (width) <integer>
Width of the panel in units.
Panel height (height) <integer>
Height of the panel in units.

Inputs[edit | edit source]

Enable
Makes the slideshow visible and active.
Disable
Makes the slideshow invisible and inactive. Bug: The timer counting the time until the next slide change will still run. The entity will immediately change to the next slide once re-enabled if it does so after that timer runs out.
SetDisplayText <string>
Sets Display Text.
RemoveAllSlides
Clears out all lists of slides. The screen will be left on the last frame it chose.
AddSlides <string>
Adds images in the folder with this keyword as their own sub-list. If Cycle Type is Forward or Backward the images will be shown once every other queued image has. If Cycle Type is Random it does the behavior described above.
SetMinSlideTime <float>
Sets Min Slide Time.
SetMaxSlideTime <float>
Sets Max Slide Time.
SetCycleType <integer>
Sets Cycle Type.
SetNoListRepeat <boolean>
Sets No List Repeat.

See Also[edit | edit source]