UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[Tutorial]Creating your own Shaders and Applying to a Players HUD - Simple

broken avatar :(
Created 10 years ago
by DidUknowiPwn
0 Members and 1 Guest are viewing this topic.
4,262 views
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
http://www.youtube.com/watch?v=MN1Upf7lhr4#ws

Simply speaking:
    • Find/create your shader.
    • Load up AssMan, create a new material.
    • Select materialType as 2D, blendFunc to Blend, tile to NO TILE, link to the image.
    • Build the material.
    • Copy raw/images/linked_image to mods/yourMod/images/
    • Go to your scripts folder create a new function or use it in an existing one (one that you created).
    • First precache the shader by using the function PrecacheShader("shader");[/u].
    • Function should include hud_spawn = create_simple_hud(self); //self represents the entity the function was called from so you better have called it like this: self thread newHUDElem or whatever entity self is BUT MAKE SURE IT'S A PLAYER.
Code Snippet
Plaintext
	something = create_simple_hud( self );
something.sort = 1;
something.hidewheninmenu = true;
something.alignX = "left";
something.alignY = "top";
something.horzAlign = "fullscreen";
something.vertAlign = "fullscreen";
something SetShader( "shader", 640, 480 );
  • mod.csv should include the material by doing: material,material_name
  • Include image and compile

GSC used on video:
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_loadout;

init()
{
//Precache shader first.
PreCacheShader("nzr_combathigh");
level thread onPlayerConnect();
}

onPlayerConnect()
{
for( ;; )
{
level waittill( "connecting", player );

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for( ;; )
{
self waittill( "spawned_player" );

wait 1;
self thread spawnHUDElem();
}
}

spawnHUDElem()
{
//create_simple_hud is located in _zombiemode_utility
something = create_simple_hud( self );
something.sort = 1;
something.hidewheninmenu = true;
something.alignX = "left";
something.alignY = "top";
something.horzAlign = "fullscreen";
something.vertAlign = "fullscreen";
something SetShader( "nzr_combathigh", 640, 480 );
something.alpha = 1;
return something;
}

broken avatar :(
×
broken avatar :(
Location: phDasmarinas, City of Cavite
Date Registered: 4 May 2014
Last active: 9 years ago
Posts
26
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Metroman260's Groups
Metroman260's Contact & Social LinksMetroman260Metroman260Metroman260Metroman260
this is great.  :o
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 22 September 2013
Last active: 4 weeks ago
Posts
327
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
Personal Quote
Zombie Mapper and Gamer
Signature
My Custom Zombie Maps:

- Nazi zombie Legion
- City of Hell
- The Abandoned Mine
- The Last Undead House (Finished)

more custom zombie maps coming soon
×
gamer9294's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
gamer9294's Contact & Social Links
Nice tutorial man, good job :)


- Gamer9294

 
Loading ...