![]() |
|
[Tutorial] Overlays - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Tutorial] Overlays (/Thread-Tutorial-Overlays.html) |
Overlays - Yamato - 07-27-2011 Hello Another tutorial, ![]() This is about overlays(HUD) Paste this anywhere in your mod code: Code: CreateOverlay( shader_name, start_alpha, color )
{
overlay = newHudElem();
overlay.x = 0;
overlay.y = 0;
overlay setshader( shader_name, 640, 480 );
overlay.alignX = "left";
overlay.alignY = "top";
overlay.sort = 1;
overlay.color = color;
overlay.horzAlign = "fullscreen";
overlay.vertAlign = "fullscreen";
overlay.alpha = start_alpha;
overlay.foreground = true;
return overlay;
}Now, to call a overlay, do this: Code: CreateOverlay( "shader,remember to precache it", alpha(put 1, for a good result) , (red,green,blue));Example of use: Code: Mod() // A random thread name
{
CreateOverlay( "minimap_scanlines", 1 , (0,1,0.2));
}I hope this helps,
RE: Overlays - barata - 07-27-2011 LOL there are soo much tutorials that my head is going to explode! VERY GOOD WORK KEEP the tutorials coming, you are fantastic man! Thanks Barata... RE: Overlays - Yamato - 07-27-2011 (07-27-2011, 14:12)barata Wrote: LOL there are soo much tutorials that my head is going to explode! VERY GOOD WORK KEEP the tutorials coming, you are fantastic man! You will all die with tuts
RE: Overlays - Lemon - 07-27-2011 I wish you were modding bo. RE: Overlays - _Smile_Man_ - 08-01-2011 (07-27-2011, 16:24)Lemon Wrote: I wish you were modding bo. NO!! Let him stay in MW2!!! ![]() RE: Overlays - tjwjdqls75 - 08-29-2011 (07-27-2011, 16:24)Lemon Wrote: I wish you were modding bo. I and many of mw2 modders want him stay in mw2 modding. He's one of a few great modders who keep modding mw2.
RE: Overlays - Twizzy - 07-22-2012 1 question... how can i clear the hud in order to make my own elem? (not recreating textures - just clear the hud showing only the gun and the environment) RE: Overlays - RaZ - 07-22-2012 (07-22-2012, 01:01)Twizzy Wrote: 1 question... how can i clear the hud in order to make my own elem? (not recreating textures - just clear the hud showing only the gun and the environment) HC mode, and set the max health back to 100... You can also use: Code: self setClientDvar( "cg_draw2D", "0" ); |