Using different shapes in HUDS.

Hello, Ive seen HUDS before that use custom shapes or diagonal rectangles like so:

How can I achieve this? Im not sure how?

Creating huds:

Creating shapes with poly ( just like connect the dots ):

Tilted rectangle as healthbar ( read original thread and compare vs code in tutorial to learn about simplifying problems ):

Another tilted:


If you see some of my tutorials, you’ll see that polys are generated OUTSIDE of HUDPaint. Instead of re-creating the poly each and every frame, you can generate it ONCE and update it when the player resolution changes.

Here’s an example of how to create a hook ( this one works ) to call PlayerChangedResolution with new/old width/height vars:

Example usage:

Hopefully these tutorials and information helps. As always, to view the Lua from any of my tutorials to enable copy/pasting ( HTML doesn’t copy/paste well in terms of HTML / CSS Highlighted Lua ), remove .html from the url.