Thats actually what im customizing right now . The t6 one is the one i changed all the perk icons and positions and ammo and stuff to. Thats the one im trying to get this to work on lol Double Post Merge: November 12, 2015, 05:59:38 pmWait so there are 9 materials (number_0-9), there is going to be seven positions called which requires only 7 itemdefs. How would the nine images ibeing called in the visible when line fit only seven itemdefs? (i might miss some stuff here and there and i might be wrong but this is causing me to learn from it )
It's actually 10, 0-9.
The dvar is a variable. So a variable ='s the name of the material. So the name of the material is set in gsc. When it is set, that is the material the menu uses. Each digit is only one number at a time.
Alright :p,and i meant 10 i wasnt thinking but so i feel like this is still wrong (my edit i mean) because i edited this and its basicaly saying number 0 will be in position 1,number 1 would be in position 2, which makes me think it should be left at number_ because it means the numbers wouldnt change (unless they do wheen shooting) but then it wouldnt know what material to use
Code Snippet
Plaintext
itemDef { name "ammmocounter1" rect (WEAPINFO_X +50) (WEAPINFO_Y -184) 40 40 forecolor 1 1 1 1 ownerdraw CG_PLAYER_WEAPON_BACKGROUND exp material (dvarstring(position1)); visible when ( dvarstring(position1) != "number_0"); decoration }
itemDef { name "ammmocounter2" rect (WEAPINFO_X +50) (WEAPINFO_Y -184) 40 40 forecolor 1 1 1 1 ownerdraw CG_PLAYER_WEAPON_BACKGROUND exp material (dvarstring(position2)); visible when ( dvarstring(position2) != "number_1"); decoration }
Last Edit: November 12, 2015, 06:18:08 pm by brandontr3
Alright :p,and i meant 10 i wasnt thinking but so i feel like this is still wrong (my edit i mean) because i edited this and its basicaly saying number 0 will be in position 1,number 1 would be in position 2, which makes me think it should be left at number_ because it means the numbers wouldnt change (unless they do wheen shooting) but then it wouldnt know what material to use
Code Snippet
Plaintext
itemDef { name "ammmocounter1" rect (WEAPINFO_X +50) (WEAPINFO_Y -184) 40 40 forecolor 1 1 1 1 ownerdraw CG_PLAYER_WEAPON_BACKGROUND exp material (dvarstring(position1)); visible when ( dvarstring(position1) != "number_0"); decoration }
itemDef { name "ammmocounter2" rect (WEAPINFO_X +50) (WEAPINFO_Y -184) 40 40 forecolor 1 1 1 1 ownerdraw CG_PLAYER_WEAPON_BACKGROUND exp material (dvarstring(position2)); visible when ( dvarstring(position2) != "number_1"); decoration }
Your getting close. The visible when depends on your gsc script you make. What you set the client dvar to when it is supposed to be shown, in this case when != to something. If you left it number_1 then it would not show when it was number_1, which isn't right. You onlyu want it not shown when it is a 0 to the left, but don't worry about that right now. You can clean that up later. For now, just make it visible 1.
Code Snippet
Plaintext
itemDef { name "ammmocounter1" rect (WEAPINFO_X +50) (WEAPINFO_Y -184) 40 40 forecolor 1 1 1 1 ownerdraw CG_PLAYER_WEAPON_BACKGROUND exp material (dvarstring(position1)); visible 1 decoration }
itemDef { name "ammmocounter2" rect (WEAPINFO_X +90) (WEAPINFO_Y -184) 40 40 forecolor 1 1 1 1 ownerdraw CG_PLAYER_WEAPON_BACKGROUND exp material (dvarstring(position2)); visible 1 decoration }
and your rect has to be adjusted for the positioning of each digit, and width
Code Snippet
Plaintext
rect X_POS Y_POS X_SIZE Y_SIZE
Last Edit: November 12, 2015, 06:31:19 pm by MakeCents
Hey i just got out of work and so when i test this out, it gives me a default checkbox texture at the area of which your hud was located which means both ammocounter1 and 2 worked. Is the texture not applied on the screen because its now not caled into the itemdef?
Hey i just got out of work and so when i test this out, it gives me a default checkbox texture at the area of which your hud was located which means both ammocounter1 and 2 worked. Is the texture not applied on the screen because its now not caled into the itemdef?
It's prob checkered because you didn't include the material in a csv. You don't have to precache it as a shader in gsc, but you need to check it when build mod and include it:
Alright thank you ill building mod right now. Also i noticed ammo had three m's when i was at work. I thought my phone with the small text was just confusing me lol. Its not a big deal i just noticed it xD Edit: it's still checkboarded 0.0
Last Edit: November 13, 2015, 03:01:42 am by brandontr3