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

Pictures for Ammo count?

HOT
broken avatar :(
Created 11 years ago
by brandontr3
0 Members and 1 Guest are viewing this topic.
7,241 views
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
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 pm
Wait 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.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 September 2014
Last active: 5 years ago
Posts
230
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
brandontr3's Groups
brandontr3's Contact & Social Links
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
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
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
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 September 2014
Last active: 5 years ago
Posts
230
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
brandontr3's Groups
brandontr3's Contact & Social Links
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?
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
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:

Like this:
Code Snippet
Plaintext
material,number_0
material,number_1
material,number_2
material,number_3
material,number_4
material,number_5
material,number_6
material,number_7
material,number_8
material,number_9
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 September 2014
Last active: 5 years ago
Posts
230
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
brandontr3's Groups
brandontr3's Contact & Social Links
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

 
Loading ...