Запрещается смотреть солдатам в глаза. Наносить ущерб собственности Альянса. Убивать комбайнов. Всегда носите при себе документы. Не поднимать шума после шести. И до шести, кстати, тоже.
27-09-2017 17:42
KekC (CS) (Member)
Зарегистрирован: May 2013
Проживает: /
Написал: 61 сообщений
Запрещается смотреть солдатам в глаза. Наносить ущерб собственности Альянса. Убивать комбайнов. Всегда носите при себе документы. Не поднимать шума после шести. И до шести, кстати, тоже.
28-09-2017 22:54
KekC (CS) (Member)
Зарегистрирован: May 2013
Проживает: /
Написал: 61 сообщений
You might be wondering how to implement these. It's easy really: you just need to use the vgui_movie_display entity, and set it to play a video when triggered (using the Enable input via a trigger_once). You can select the video by setting the "Movie Filename" keyvalue (check the VDC Wiki for a list of video files to use). Portal 2 video files use the Bink Video (.bik) file format and custom .biks cannot be embedded into any map for the workshop.
For the round elevator rooms where you're surrounded by these videos, you'll need several of these entities, each with different U (horizontal) and V (vertical) minima and maxima. Because each entity is going to have a different set of U and V values, they have to be named separately (yes, each individual one — no grouping). To begin with, you'll need to first use the SetUseCustomUVs input on each vgui_movie_display via a logic_auto. Then you'll need to use use the SetUMax and SetVMax inputs and some logic_relays for organization.
The background for every elevator video is simply a worldbrush textured with something like elevator/elevator_screen (or the broken variants) on the front face. Next, for each screen, the entity goes in the bottom left corner and 0.25 units off of the brush (otherwise there's that weird-looking "Z-fighting" effect). Finally, for each of the vgui_movie_displays, set the width and height to the width and height of each of your panels (this, thankfully, can be done in one step if your panels are all the same size).
Although the entity is positioned where it is, this does not quite reflect the UV scale it uses. U=0 is all the way left whereas U=1 is all the way right, and V=0 is at the top whereas V=1 is at the bottom. Keep this in mind when rescaling each of the vgui_movie_displays for your video display. This same UV scale can also be used to rescale overlays (but there we use the keyvalues instead of inputs).
In some of Valve's elevator rooms, the U values to split from are multiples of 1/23. The V values to split from are even simpler: 0.0, 0.5, and 1.0. Valve ultimately decided to write a script — video_splitter.nut (viewable in Notepad) — to handle the video splitting because of its complexity, and also to be able to conveniently create various effects for video splitting. This does not mean, however, that you need to know how to write a script to make elevator videos work.
It's typical to create a trigger_once where the player starts to leave the elevator room to turn off the videos and some lights. This same trigger also opens the door to either the test chamber or the antechamber containing the test chamber sign.
Может кто-нибудь скинуть vtf и vmt от elevator/elevator_screen