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

Set forecolor based on if condition menu

broken avatar :(
Created 8 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
4,180 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
I have seen this in menus, and was wondering if I could use this to set the rect based on a dvar?

Code Snippet
Plaintext
#ifndef PC
rect -47 -40 54 27
#else // #ifndef PC
rect (WEAPINFO_X +116) (WEAPINFO_Y +15) 80 40
#endif // #ifndef PC

I want to so something like:
Code Snippet
Plaintext
#if(dvarstring("test")=="yes")
forecolor 1 1 1 1
#else
forecolor .2 .2 0 .5
#endif

Which didn't work...
Last Edit: February 28, 2016, 02:11:57 am by MakeCents
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
if you want to set a rect based on a specific condition, you have to create 2 or more itemDefs for each condition.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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 you want to set a rect based on a specific condition, you have to create 2 or more itemDefs for each condition.

I've done that but for some reason I'm at some type of limit where if I add any more itemdefs, it crashes without the T4M mod. I don't really understand why, but I have randomly commented out 2 itemdefs and it works. So I am trying to consolidate some.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I've done that but for some reason I'm at some type of limit where if I add any more itemdefs, it crashes without the T4M mod. I don't really understand why, but I have randomly commented out 2 itemdefs and it works. So I am trying to consolidate some.
Not possible, sorry.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
Not possible, sorry.

lolol, I said the same thing and after two days of testing, I cannot see any other solution. I've commented out itemdefs with the same materials, with different materials, in different menudefs, and same results. So I am not sure what is causing the issue, but I would like to use one item def for two purposes atm. I have found another way around the images issue I was having, but I would also like to adjust the forecolor.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
#define DVAR_IS_TRUE ( dvarstring( "test" )=="yes ")
#ifdef  DVAR_IS_TRUE
         forecolor      1 1 1 1
#else
         forecolor      .2 .2 0 .5
#endif
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
#define DVAR_IS_TRUE ( dvarstring( "test" )=="yes ")
#ifdef  DVAR_IS_TRUE
         forecolor      1 1 1 1
#else
         forecolor      .2 .2 0 .5
#endif
this won't work
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Stuff like that worked very well for me. Don't see why not.
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
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
You can modify position using exp check main.menu for fog scrolling.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
#define DVAR_IS_TRUE ( dvarstring( "test" )=="yes ")
#ifdef  DVAR_IS_TRUE
         forecolor      1 1 1 1
#else
         forecolor      .2 .2 0 .5
#endif

This behaved as if it was always defined.


You can modify position using exp check main.menu for fog scrolling.

sorry, I said rect in title, I meant forecolor.

I tried this:
Code Snippet
Plaintext
#define PERK_COLOR		1 (dvarint("powerswitch")) (dvarint("powerswitch")) 1

//in itemdef
forecolor PERK_COLOR

but that didn't work for me either


Not possible, sorry.

I just went down to the compass itemdefs and commented them out, now I can have all the ones I wanted in and it doesn't matter anymore. Still don't know why, but its working with those commented out.
Last Edit: February 28, 2016, 02:37:50 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Yeah editing forecolor, besides alpha, I do not think is possible. I tried exp forecolor R, G, and B and also exp forecolor C for the whole color all together, and mod builder said only 'A' for alpha works. And you cannot use dvars on anything but 'exp' and 'visible when();' so yeah the only way to change the color is making different ItemDef's which is kinda limiting.
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
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
If you want to change the color you can do exp R,G,B,A which controls forecolor

Wait I'll check into waw later the colors should be supported.
Last Edit: February 28, 2016, 05:28:41 pm by DidUknowiPwn
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
If you want to change the color you can do exp R,G,B,A which controls forecolor

Wait I'll check into waw later the colors should be supported.

No you cannot. I tried this and launcher gave me an error saying it expected only "A".

 
Loading ...