the function - create_chalk_hud actually creates the round indicator HUD at the bottom right of the screen. The value inside the brackets are the horizontal distance from the edge of the screen. Therefore, 'chalk_hud1' in created on the very edge of the screen, while 'chalk_hud2' in created 64 (pixels?) from the edge. *'chalk_hud1' is actually the first 5 chalks drawings; 'chalk_hud2' is the second 5 chalks, which all makes up to 10 chalk drawings.
If you're trying to move the chalk hud further away from the edge, just change the values inside the brackets. e.g. I want the chalk hud to be 20 pixels further, then you'll have to change the lines of code to:
Just remember to have the second chalk hud 64 pixels away from the first one; of course you change it on your own to your liking
IMPORTANT NOTE: Be careful when modifying the chalk hud because there are many function within _zombiemode.gsc that dealt with the chalk hud. Find the keyword 'chalk' in the script and modify the distance, x/y-offsets, and shader sizes; to ensure that the chalk hud looks fine in-game. Test it in-game to see if something is messed up; look into the codes to understand how it works. There are more than just 2 lines of code that handle the chalk hud.
Perks Icons (Shaders) For the perks icons, you'll have to do similar adjustment, to the perk script. Again, copy _zombiemode_perks.gsc to your mod folder if you didn't have one.
Find the function 'perk_hud_create', and there should be a line:
Code Snippet
Plaintext
hud.x = self.perk_hud.size * 30;
This essentially aligns all perks horizontally by setting the icons to be apart, multiplying the perk's count by 30. So, if the player buys the third perk, the icon will be created 90 pixels away from the edge of the screen.
Let's say you'd like to space out the perks as well for 20 pixels away from the edge, you can do this:
Code Snippet
Plaintext
hud.x = (self.perk_hud.size * 30) + 20;
So that all of the perks' icons will be 20 pixels away as well. *The number '30' is NOT the distance between the icons because the x-position is only a point on the screen. The shaders are actually 24x24 pixels large so the perks' icons are effectively 6 pixels apart.
Looking into other lines in that function; you can modify anything about the perks' shaders. You can change it's y-position, alpha, even shader size, that is just mentioned. Be careful while modifying the shader' size because it correlates with the distance between icons, so you'll have to adjust 2 values.
Looking into _zombiemode.gsc and _zombiemode_perks.gsc gives you a lot of idea, of how the game works Hope this works.
Last Edit: September 02, 2014, 10:52:33 am by JustForFun119
the function - create_chalk_hud actually creates the round indicator HUD at the bottom right of the screen. The value inside the brackets are the horizontal distance from the edge of the screen. Therefore, 'chalk_hud1' in created on the very edge of the screen, while 'chalk_hud2' in created 64 (pixels?) from the edge. *'chalk_hud1' is actually the first 5 chalks drawings; 'chalk_hud2' is the second 5 chalks, which all makes up to 10 chalk drawings.
If you're trying to move the chalk hud further away from the edge, just change the values inside the brackets. e.g. I want the chalk hud to be 20 pixels further, then you'll have to change the lines of code to:
Just remember to have the second chalk hud 64 pixels away from the first one; of course you change it on your own to your liking
IMPORTANT NOTE: Be careful when modifying the chalk hud because there are many function within _zombiemode.gsc that dealt with the chalk hud. Find the keyword 'chalk' in the script and modify the distance, x/y-offsets, and shader sizes; to ensure that the chalk hud looks fine in-game. Test it in-game to see if something is messed up; look into the codes to understand how it works. There are more than just 2 lines of code that handle the chalk hud.
Perks Icons (Shaders) For the perks icons, you'll have to do similar adjustment, to the perk script. Again, copy _zombiemode_perks.gsc to your mod folder if you didn't have one.
Find the function 'perk_hud_create', and there should be a line:
Code Snippet
Plaintext
hud.x = self.perk_hud.size * 30;
This essentially aligns all perks horizontally by setting the icons to be apart, multiplying the perk's count by 30. So, if the player buys the third perk, the icon will be created 90 pixels away from the edge of the screen.
Let's say you'd like to space out the perks as well for 20 pixels away from the edge, you can do this:
Code Snippet
Plaintext
hud.x = (self.perk_hud.size * 30) + 20;
So that all of the perks' icons will be 20 pixels away as well. *The number '30' is NOT the distance between the icons because the x-position is only a point on the screen. The shaders are actually 24x24 pixels large so the perks' icons are effectively 6 pixels apart.
Looking into other lines in that function; you can modify anything about the perks' shaders. You can change it's y-position, alpha, even shader size, that is just mentioned. Be careful while modifying the shader' size because it correlates with the distance between icons, so you'll have to adjust 2 values.
Looking into _zombiemode.gsc and _zombiemode_perks.gsc gives you a lot of idea, of how the game works Hope this works.
He'd also have to modify hud.menu in order to get the right side of the hud to match with the left side.
"Deleted code is debugged code." - Jeff Sickel "Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes." - Richard Hamming