VGUI help
CamBen wrote:
The easiest way to do it is to put a func_brush in the player's chest and parent the vgui brush in front of it, then on the chest brush, use a logic_measuremovement to make it move with the player's eye movement.
IIRC, you can parent it straight to the player's 'Eye' attachment point instead. However, you will have the brush moving too much and sort of rolling, like if it truly was parented to an actual eye
(tested)
What I do for my maps' entry titles and other pop-up messages to fake a Hud display, is to parent the func_brushes to !player.
@QuantumNarwhal: I've digged deep for some time now into modifying the HUD, how it is programmed and what entities are involved... if what you mean by "VGUI" is what you see displayed on screen. As Felix said this is hard-coded and you will probably need to use the "mod" structure to be able to achieve actual changes on the Portal2 HUD. The best guide on how to modify the HUD I found is this one. Even though it was written for Counter Strike, it basically works the same in other Source games.
CamBen wrote:
The easiest way to do it is to put a func_brush in the player's chest and parent the vgui brush in front of it, then on the chest brush, use a logic_measuremovement to make it move with the player's eye movement.
Whenever I spawn, I just get stuck in the func_brush.
CamBen wrote:
Disable collisions on it
Thanks for the last bit, that was pretty stupid of me not to notice that. How do I name the player entity though? Its asking me to give a 'Movement reference'.
Entity to measure : (blank)
Measure reference : reference_target (info_target entity near the player)
Entity to move : brush_vgui_01 (whatever it is called)
Movement reference : reference_target
Then using a logic auto, give the measuremovement an output to set entity to measure to !player
CamBen wrote:
These should be the keyvalues:Entity to measure : (blank)
Measure reference : reference_target (info_target entity near the player)
Entity to move : brush_vgui_01 (whatever it is called)
Movement reference : reference_targetThen using a logic auto, give the measuremovement an output to set entity to measure to !player
Everything with the moving brush is fine now, and I've been trying to put the vgui_movie_display entity to display on the moving brush (to make it into some sort of video communicator type thing) but it just doesn't display. I've used a vgui_movie_display before and it's worked fine, the only difference is this time it's got a parent - the moving brush.
yishbarr wrote:
I think you should use a moving image instead, since the VGUI movie thing probably doesn't work when moving.
I'll try a gif. If not, I can work with an image.
FelixGriffin wrote:
You can't use gifs (or pngs or jpegs) in Portal 2. You need to make a VTF and VMT.
Yeah, that's what I meant. Convert your GIF to VTF, and make a UnlitGeneric VMT.
QuantumNarwhal wrote:
I've been trying to put the vgui_movie_display entity to display on the moving brush (to make it into some sort of video communicator type thing) but it just doesn't display. I've used a vgui_movie_display before and it's worked fine, the only difference is this time it's got a parent - the moving brush.
It is VERY possible to make that system to work, I just made it. Maybe you are not parenting the entities correctly or firing the correct outputs.
*I parented my vgui_movie_display to the func_brush.
The func_brush to the func_tracktrain
The func_tracktrain has as first stop its due path_track
The path_track1 leads to path_track2
A prop_button move the train and enable/disable the vgui_movie_display and everything works like a charm!
*
Make sure that you also put the correct video movie name and full path and file extension (for example: media/valve.bik)
Good luck
josepezdj wrote:
QuantumNarwhal wrote:I've been trying to put the vgui_movie_display entity to display on the moving brush (to make it into some sort of video communicator type thing) but it just doesn't display. I've used a vgui_movie_display before and it's worked fine, the only difference is this time it's got a parent - the moving brush.
It is VERY possible to make that system to work, I just made it. Maybe you are not parenting the entities correctly or firing the correct outputs.
*I parented my vgui_movie_display to the func_brush.
The func_brush to the func_tracktrain
The func_tracktrain has as first stop its due path_track
The path_track1 leads to path_track2
A prop_button move the train and enable/disable the vgui_movie_display and everything works like a charm!
*
Make sure that you also put the correct video movie name and full path and file extension (for example: media/valve.bik)
Good luck
Where does the func_tanktrain come in? As in, what is it's purpose?