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"); }
When the do_hud func is called the code prints "power_panel", the shader name. What the hell am I missing? I've checked everything a lot of times :v
I can post the full code, if that helps.
Last Edit: February 19, 2016, 06:28:47 pm by Linoxet
For the x coord use "center" and for the y use "middle", at least that's how it is in treyarch scripts.. Not sure if it really make's a difference. And the same goes for "hud.horzAlign ", but it dosen't make sense why it would work with other shaders then. Is this one Always the first part that is picked up?
This should make them all default texture if the material/image is still not getting in. But if it works, then we know it is something else.
Edit, I am sure we asked this before, but the iwi is checked when you build your mod right? If you open your iwd and look into the images folder, it's there right?
Last Edit: February 19, 2016, 06:50:59 pm by MakeCents
For the x coord use "center" and for the y use "middle", at least that's how it is in treyarch scripts.. Not sure if it really make's a difference. And the same goes for "hud.horzAlign ", but it dosen't make sense why it would work with other shaders then. Is this one Always the first part that is picked up?
This should make them all default texture if the material/image is still not getting in. But if it works, then we know it is something else.
Edit, I am sure we asked this before, but the iwi is checked when you build your mod right? If you open your iwd and look into the images folder, it's there right?
Will try that, and yes, it's there Double Post Merge: February 19, 2016, 06:58:28 pmStill missing image, even with the shader "really" defined :v Edit: I'll try a pact with Satan or something like that and will come back to this later, really thanks for the help Double Post Merge: February 19, 2016, 07:39:34 pmOk, I think I got something now. I changed the kvp in radiant to a random shader just for testing, and probably there's something wrong with my script. Now the "power_panel" works, but the "power_hand" not
Last Edit: February 19, 2016, 07:39:34 pm by Linoxet
I changed the kvp in radiant to a random shader just for testing, and probably there's something wrong with my script. Now the "power_panel" works, but the "power_hand" not
if (player.part != "none") { /# player iprintln("Ja possui uma Parte!"); #/ } else { if( is_player_valid( player )) { player.part = self.script_noteworthy; /# player iprintln("Pegou " + player.part); #/ self delete(); part delete(); player do_hud(player.part); player play_sound_on_entity("part_pick"); break; } } wait 0.3; } }
Edit: Instead of checking level.power_build on each "if (part == "bla")" I realized I could just put it on the bottom, and use "else if (part == "bla")"... Lol, just noticed that now
Last Edit: February 19, 2016, 08:10:17 pm by Linoxet
... you're defining part_hud[] as a "normail" variable, not as property of the player (self). Then, you associate "hud" to an unexisting property of self. So part_hud.size will always be 0, because you define it every time you call the function. I don't think this is going to fix anything at all, but it should be something like:
Code Snippet
Plaintext
do_hud(shader) { if( !isDefined( self.part_hud ) // <- changes here self.part_hud = []; // <- changes here
The hud part doesn't matter, cause he ends up just self.hud_part = hud;, but I do think that maybe something is happening and the default texture may be being put on top of the other textures maybe, possibly related to what soy said, where your not really using the array, and you seem to just keep putting them in the same place? What do you think soy?
Maybe if he gets it to spread out he will see he that the images are working but that he is threading more than he should? I don't know, it's tough to see a reason for it.
Last Edit: February 19, 2016, 08:50:04 pm by MakeCents
... you're defining part_hud[] as a "normail" variable, not as property of the player (self). Then, you associate "hud" to an unexisting property of self. So part_hud.size will always be 0, because you define it every time you call the function.
I edited the script and forgot to put "self.part_hud" back, sorry
Edit: I just edited a bit this hud func from a tutorial script, I don't know much about hud.
Last Edit: February 19, 2016, 08:54:34 pm by Linoxet
The hud part doesn't matter, cause he ends up just self.hud_part = hud;, but I do think that maybe something is happening and the default texture may be being put on top of the other textures maybe, possibly related to what soy said, where your not really using the array, and you seem to just keep putting them in the same place? What do you think soy?
Maybe if he gets it to spread out he will see he that the images are working but that he is threading more than he should? I don't know, it's tough to see a reason for it.
Haven't read everything of the topic, but I understood he gets that squared default texture. But there's no relation between the place the images are put and having the default texture. It's likely that it appears on top of other images but not that it appears with that texture. No idea.
Haven't read everything of the topic, but I understood he gets that squared default texture. But there's no relation between the place the images are put and having the default texture. It's likely that it appears on top of other images but not that it appears with that texture. No idea.
My idea was to destroy that image with this line self.hud_part destroy_hud(); when the part is added, and it actually works, the hud is destroyed or is just hidden and every image is being put on top of each other?