Vgui slideshow display
From Valve Developer Community
This point-based entity is available in all Source games.
| Table of contents |
[edit]
Entity Description
A VGUI screen the displays images in a slideshow.
- See also VGUI Screen
[edit]
Creation Notes
- Place it in the lower left corner of where you want the screen and rotate it so that the red axis points which way you want the screen to face.
- You'll need to move it slightly away from the surface it sits on to avoid Z-fighting. 1 unit is enough.
- Images in sub directories will NOT be included.
[edit]
Adding Slides to Slideshow
- Keywords are added in the vmt like so: "%keywords" "test1, test2, another_sample_keyword, cow, animal"
- AddSlides can be used up to 16 times in succession to add addition slides. So you can add "cow" slides and then add "chicken" slides if you want both cows and chickens to be in the shuffle.
- Slides are first shuffled by keyword. So if you have 400 "cow" slides and 10 "chicken" slides there's still a 1 out of 2 chance that you'll see a chicken. Then if "chicken" is selected for display there's a 1 out of 10 chance that you'll see any specific chicken.
- The same keyword 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.
[edit]
Key values
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- parentname <target_destination>
- Specifies the targetname of this entity's Parent in a movement hierarchy. Child entities move with their Parent.
- Pitch Yaw Roll (Y Z X)
- This entity's angular orientation in the world (also used for angular effect entities).
- displaytext <string>
- Text to display on top of the image.
- directory <string>
- Directory where images are located (materials/vgui/[directory]).
- minslidetime <string>
- Minimum amount of random time that a slide is displayed.
- maxslidetime <string>
- Maximum amount of random time that a slide is displayed.
- cycletype <choices>
- Order that images are displayed (0 - random, 1 - forward, 2 - backward).
- width <integer>
- Width of the panel in units.
- height <integer>
- Height of the panel in units.
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- SetParent <target_destination>
- Changes the entity's parent in the movement hierarchy.
- SetParentAttachment <string>
- Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
- SetParentAttachmentMaintainOffset <string> [Episode One Update]
- Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the Parent's Origin and Angles at the time it is attached.
- Removes this entity from its current movement hierarchy.
- Enable
- Make the vgui screen visible.
- Disable
- Make the vgui screen invisible.
- SetDisplayText <string>
- Sets the text displayed over the image.
- RemoveAllSlides
- Removes all slides from slideshow.
- AddSlides <string>
- Add all slides that contain this keyword. If no keyword parameter is provided, ALL the slides are added.
- SetMinSlideTime
- Sets the minimum random time between slides.
- SetMaxSlideTime
- Sets the maximimum random time between slides.
- SetCycleType
- Sets the order that images are displayed (0 - random, 1 - forward, 2 - backward).
- SetNoListRepeat
- When set, the random list choser will never choose the same list twice in a row.
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
