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 Shader not working

HOT
broken avatar :(
Created 10 years ago
by Linoxet
0 Members and 1 Guest are viewing this topic.
11,696 views
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
I've made my own script for buildables, everything is working perfectly (what a surprise) except the hud for one part.
When I pick up the part, a hud is created for that part, I know it's working cuz the 2 parts out of 3 works, the image is showing. But if I pickup that one specific part the hud shows as a missing image. I have "precacheShader" in the main() of the script, I've converted the asset, I've the image checked on launcher, I have "material, image_shader" on mod.csv and I've make sure everything is correct 100 times, but is not working with THIS image. Is there anything else to do?  :o

I can post the script, but I don't think it's necessary since the other 2 of 3 images are working correctly. Thanks in advance and sorry for bad english  :troll:
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 4 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social LinksTimSmithtimsmith90THEREALBaDBoY17My clan Website
I think the materials file for that image should in into your mod too .
broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 5 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
Signature
Overrun
Lockdown
Overrun (Black Ops Mod)
Snowglobe
Leviathan
Abandoned School
Ski Resort
Leviathan Redux
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods 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
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
I think the materials file for that image should in into your mod too .
:gusta: Just no

@Linoxet well you said you included the precache for the material in the main function - I'm assuming for your script - but is your script called before _zombiemode.gsc? 'cause if not, then the precache won't do anything. If that's the case, make sure you put the precache at the top of _zombiemode.gsc instead, or somewhere before _zombiemode.gsc is called.
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
:gusta: Just no

@Linoxet well you said you included the precache for the material in the main function - I'm assuming for your script - but is your script called before _zombiemode.gsc? 'cause if not, then the precache won't do anything. If that's the case, make sure you put the precache at the top of _zombiemode.gsc instead, or somewhere before _zombiemode.gsc is called.

Yeah, it's called before "maps\_zombiemode::main();"

The other 2 images works normally, everything is the same, only change is the name :v
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 2 years ago
Posts
3,997
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Has released one or more maps to the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Any errors in Launcher?
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
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 everything is the same for all images, then copy one that works, rename it the one that doesn't work. If it works, then something is wrong with that image, if it doesn't, then you have something wrong. The wrong name being used for the image, or a typo in csv or gsc, or even when you converted the image in assman, something like that.
Last Edit: February 18, 2016, 06:44:57 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
If everything is the same for all images, then copy one that works, rename it the one that doesn't work. If it works, then something is wrong with that image, if it doesn't, then you have something wrong. The wrong name being used for the image, or a typo in csv or gsc, or even when you converted the image in assman, something like that.

That's the thing, I've copied 1000 times, i've checked all the image names and everything that can possibly give me that error and still not working :v
Thanks for the help anyway, I'll keep working on the map and will go back to this later :D
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's the thing, I've copied 1000 times, i've checked all the image names and everything that can possibly give me that error and still not working :v
Thanks for the help anyway, I'll keep working on the map and will go back to this later :D

Okay, send me your gdt your using, and image your making it from and I'll test it.

Edit: I assume you didn't get any errors when converting it?
Last Edit: February 18, 2016, 09:35:19 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
Okay, send me your gdt your using, and image your making it from and I'll test it.

Edit: I assume you didn't get any errors when converting it?

Nop, no errors. Sent you a PM with the gdt and image.
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
Nop, no errors. Sent you a PM with the gdt and image.

Works fine:


What are you calling it in mod.csv? material,?
Copy and paste so its exact please. Also precache, I assume you are precaching it with the others? Either in zombiemode or a gsc called from zombiemode?
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
Works fine:
(Image removed from quote.)

What are you calling it in mod.csv? material,?
Copy and paste so its exact please. Also precache, I assume you are precaching it with the others? Either in zombiemode or a gsc called from zombiemode?






Last Edit: February 19, 2016, 05:45:53 pm by Linoxet
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. Only part you didn't show was the part where it sets the shader. Assuming that is spelled correctly as well and there are no issues, only thing I can think of is make sure there are no spaces or hidden characters after the name in the csv file (probably arn't), and try to convert the image again as a new name. I've heard techset data gets involved, and maybe something there is messed up, idk really, just a guess.
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
Code Snippet
Plaintext
do_hud(shader)
{
part_hud = [];
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "middle";
hud.alignY = "bottom";
hud.horzAlign = "middle";
hud.vertAlign = "bottom";
hud.x = part_hud.size * 45;
hud.y = hud.y - 80;
hud.alpha = 1;
hud SetShader( shader, 40, 40 );
//self.part_hud[ shader ] = hud;

self.hud_part = hud;

}

I don't know much about hud, so I've copied it from a tutorial and modified a bit.

When the player pickup a part the hud function is called here:

Code Snippet
Plaintext
player.part = self.script_noteworthy; //self = use_trigger, I have this set correctly
player do_hud(player.part); //for the other 2 images, it works normally
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
Okay, well since all other parts work I would assume that this one would work as well as far as the script is concerned. The script doesn't check if the image is undefined or anything like that though, so that could still be a thing to use to catch the issue.

This doesn't look like the entire script so I won't start fixing things, but one thing that can happen is If the kvp on whatever is self in this case, is not defined or the wrong kvp, you will still have an issue.

You can add this to your do_hud(shader) function to do some testing or look at the kvp in radiant:
Code Snippet
Plaintext
if(isdefined(shader)){
    iprintln(shader);
}else{
    iprintln("no shader was defined");
}

 
Loading ...