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

Hud's shader does not work

HOT
broken avatar :(
Created 10 years ago
by niick555
0 Members and 1 Guest are viewing this topic.
8,732 views
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
All right guys?
I'm doing an easter egg jumpscare on my map, but I can not put the picture at all... I'm trying to get through the HUD, is that correct? But the problem is that I can not make images appear on the HUD at all... I used the tutorial below (the DidUknowiPwn's tutorial), but the image just do not appear in the game... I've tried with different images, I created my own shader through Asset Manager, I used existing shaders in the game, and does not work... Does anyone know what might be happening?

Tutorial: http://ugx-mods.com/forum/index.php?topic=4174.0

Thank you for all!
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
If it worked with the juggernaut shader, I would say that it was your image or you didn't include the material in csv, or you didn't precache it in gsc. But since your not getting anything to work, I'd have to lean towards you not doing something correctly... maybe, probably script related is where I would start guessing.

Did you call the new gsc from zombiemode where the others are called from and did you check it when you built your mod?
Last Edit: February 17, 2016, 08:25:25 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
If it worked with the juggernaut shader, I would say that it was you image or you didn't include the material in csv, or you didn't precache it in gsc. But since your not getting anything to work, I'd have to lean towards you not doing something correctly... maybe, probably script related is where I would start guessing.

Did you call the new gsc from zombiemode where the others are called from and did you check it when you built your mod?

I created a GSC and put only the script shader test the inside, as it was not working the other forms... The script shader.gsc below:

Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_loadout;

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

onPlayerConnect()
{
players = getPlayers();

for(i = 0; i < players.size; i++) {
players[i] 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.foreground = true;
something.sort = 1;
something.hidewheninmenu = false;
something.alignX = "left";
something.alignY = "bottom";
something.horzAlign = "left";
something.vertAlign = "bottom";
something SetShader( "shader_test", 24, 24 );
something.alpha = 1;
return something;
}

In my GSC, map name.gsc, I added the following line after the maps maps\_zombiemode::main();

Code Snippet
Plaintext
maps\shader::init();

It also added the "material,shader_test" on my CSV... Is that correct? Or is there some mistake?
Last Edit: February 17, 2016, 08:27:35 pm by niick555
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
That all seems correct. Have you added any iprintlns to where it sets the hud? To see if it is running the script at least?


In my GSC, map name.gsc, I added the following line after the maps maps\_zombiemode::main();

I personally like to call it inside zombiemode main function where zombiemode_perks and the others are called. But I am not sure that there is a difference, except for the notify you are waiting for may already have been notified...? So your script may not be running. It may still be waiting for that notify.

Code Snippet
Plaintext
self waittill( "spawned_player" );

Edit: And preache_shaders I put in zombiemode too.
Last Edit: February 17, 2016, 09:07:09 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
He is running yes! Because I tried to change:

Code Snippet
Plaintext
something SetShader( "shader_test", 24, 24 );

for:

Code Snippet
Plaintext
something SetText("hello");

and it worked! Weird..
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Edit: Nevermind, thought you were trying to make it full screen.


Did you try a shader you know is working?

Have you tried adjusting x or y or making it show in the center?

Are your image names and material names the same, in case you switched them? This is far fetched, but possible I guess.
Last Edit: February 17, 2016, 08:48:34 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
Edit: Nevermind, thought you were trying to make it full screen.


Did you try a shader you know is working?

Have you tried adjusting x or y or making it show in the center?

Are your image names and material names the same, in case you switched them? This is far fetched, but possible I guess.

I do not know if the shader is running... But it is very strange, why did the same material in the tutorial... How can I test? My stuff and my image has different names, but when I export the material comes in IWI, right? The name should I refer to the CSV is the name of the material... is not it?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I do not know if the shader is running... But it is very strange, why did the same material in the tutorial... How can I test? My stuff and my image has different names, but when I export the material comes in IWI, right? The name should I refer to the CSV is the name of the material... is not it?

Now you have me confused, lol. I'm not at home to double check. I always use the name that you give it in assman, I think  :-\. I name everything the same between the two cause of this confusion, lol. If that is the same name as what you named it, then yes.

you can just use one of your perk shaders to test, like for jug or qr,

Code Snippet
Plaintext
something SetShader( "specialty_juggernaut_zombies", 24, 24 );
Last Edit: February 17, 2016, 09:22:09 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
Now you have me confused, lol. I'm not at home to double check. I always use the name that you give it in assman, I think  :-\. I name everything the same between the two cause of this confusion, lol. If that is the same name as what you named it, then yes.

you can just use one of your perk shaders to test, like for jug or qr,

Code Snippet
Plaintext
something SetShader( "specialty_juggernaut_zombies", 24, 24 );

Sorry! haha
I took the test with jugger's shader, but still did not show up... I do not know what to do...
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years 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.
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
Set in center (for all 4) and if it shows start messing with the alignments.

Edit: That My script you're using will continuously spawn the hud element when you respawn which is something you don't want. Make another function to delete itself when you hit the waittill death.

Last Edit: February 17, 2016, 11:06:10 pm by DidUknowiPwn
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
Set in center (for all 4) and if it shows start messing with the alignments.

Edit: That My script you're using will continuously spawn the hud element when you respawn which is something you don't want. Make another function to delete itself when you hit the waittill death.

I set to appear in the center, as follows:

Code Snippet
Plaintext
	something.alignX = "center";
something.alignY = "middle";
something.horzAlign = "center";
something.vertAlign = "middle";

Right? About the function I am using for testing only, why I can not really make the images appear... If I change to a text, it appears in the spawn... Any tips?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Sorry! haha
I took the test with jugger's shader, but still did not show up... I do not know what to do...

If your using someone else's perks, that material might not work, sorry, didn't think of that. I think you can try "white" or "black" though.
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
If your using someone else's perks, that material might not work, sorry, didn't think of that. I think you can try "white" or "black" though.

Wow! I was forgetting that too... I'm using the Harry's pack! And it worked perfectly with the white texture! That's weird! I must be doing something wrong at the time you import a custom shader, but can not find the error...
Last Edit: February 17, 2016, 11:26:03 pm by niick555
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Wow! I was forgetting that too... I'm using the Harry's pack! And it worked perfectly with the white texture! That's weird! I must be doing something wrong at the time you import a custom shader, but can not find the error...

Try converting the image again with a new name, using the same name for the image and the material, then try precaching the shader in zombiemode, in the main function. You'll find others there. Of course, making sure to change the material name in mod.csv

Edit, don't forget to copy image to images folder in mod, and check it when building mod
Last Edit: February 17, 2016, 11:44:45 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 8 June 2015
Last active: 9 years ago
Posts
38
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
niick555's Groups
niick555's Contact & Social Links
Try converting the image again with a new name, using the same name for the image and the material, then try precaching the shader in zombiemode, in the main function. You'll find others there. Of course, making sure to change the material name in mod.csv

Edit, don't forget to copy image to images folder in mod, and check it when building mod

I need to copy the IWI and DDS for mods folder? I made another shader, all right, but it really does not work ...: \

 
Loading ...