VGUI help
Quote from QuantumNarwhal on May 20, 2014, 3:07 pmReally 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.
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.
Quote from FelixGriffin on May 21, 2014, 6:18 pmWhat sort of VGUI do you mean? Most things with that prefix need to be hard-coded, which is impossible in Portal 2.
What sort of VGUI do you mean? Most things with that prefix need to be hard-coded, which is impossible in Portal 2.
Quote from CamBen on May 21, 2014, 8:55 pmThe 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.
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.
Aperture Science: We do our science asbestos we can!
Quote from josepezdj on May 22, 2014, 12:52 amCamBen 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.
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.
Quote from QuantumNarwhal on June 13, 2014, 12:24 pmCamBen 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.
Whenever I spawn, I just get stuck in the func_brush.
Quote from CamBen on June 13, 2014, 2:10 pmDisable collisions on it
Disable collisions on it
Aperture Science: We do our science asbestos we can!
Quote from QuantumNarwhal on June 14, 2014, 10:29 amCamBen wrote:Disable collisions on itThanks 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'.
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'.
Quote from CamBen on June 14, 2014, 1:54 pmThese 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
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
Aperture Science: We do our science asbestos we can!
Quote from QuantumNarwhal on June 25, 2014, 6:02 amCamBen 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.
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.
Quote from Gemarakup on June 25, 2014, 6:39 amI think you should use a moving image instead, since the VGUI movie thing probably doesn't work when moving.
I think you should use a moving image instead, since the VGUI movie thing probably doesn't work when moving.