Please or Register to create posts and topics.

VGUI help

Page 1 of 2Next

Really want to know how to do VGUI in maps, I've googled it, youtubed it, and all I found was examples. Please do not link me to the dev wiki, I got confused there.

*tips fedora as everything behind him explodes in memes*

What sort of VGUI do you mean? Most things with that prefix need to be hard-coded, which is impossible in Portal 2.

Falsi sumus crusto!

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.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!
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 :lol: (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.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
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.

*tips fedora as everything behind him explodes in memes*

Disable collisions on it

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!
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'.

*tips fedora as everything behind him explodes in memes*

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_target

Then using a logic auto, give the measuremovement an output to set entity to measure to !player

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!
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_target

Then 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.

*tips fedora as everything behind him explodes in memes*

I think you should use a moving image instead, since the VGUI movie thing probably doesn't work when moving.

Page 1 of 2Next