One Click - Checkbox Enabled (1)
17 posts
• Page 1 of 2 • 1, 2
One Click - Checkbox Enabled (1)
For some reason, I cannot figure out how to set my checkbox to TRUE (1) using a one click . Look at the excerps of my code below for the affected code. The "Wildcats Config" is the problem. The two radio boxes work fine but the checkbox does not work. I cannot get it set to true or checked. I can get the checkbox set to disabled (0).
I use #04:00 to disable (0). I have been using #04:01 to enable (1). I have tried 1, 11, 10 and none seem to help. Is there an issue with using the bitoffset?
I use #04:00 to disable (0). I have been using #04:01 to enable (1). I have tried 1, 11, 10 and none seem to help. Is there an issue with using the bitoffset?
- Code: Select all
/*
[ONE CLICK CONFIGURATION]
shortdesc = One click predefined configurations
control = config
item = Default Values:8002050028FF9C028F0078FF6A
item = Wildcats Config (saves me time):#00:01#01:01#04:01
[ADS/SCOPE AND SHOOT BUTTONS]
shortdesc = Select the buttons that you are using for ADS/SCOPE and SHOOT buttons
byteoffset = 0
bitsize = 8
control = radiobox
default = 0
item = L2 / R2 or LT / RT
item = L1 / R1 or LB / RB
[TACTICAL AND MELEE BUTTONS]
shortdesc = Select the buttons that you are using for MELEE and Crouch/Prone
byteoffset = 1
bitsize = 8
control = radiobox
default = 0
item = DEFAULT: R3 / RS for MELEE and Circle / B for Crouch/Prone
item = TACTICAL: R3 / RS for Crouch/Prone and Circle / B for MELEE
[LOOK INVERSION ]
byteoffset = 4
bitsize = 1
bitoffset = 1
control = checkbox
default = 0
item = Check this box if you are using LOOK INVERSION in the game settings
*/
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: One Click - Checkbox Enabled (1)
- Code: Select all
/* *****************************************************************************
<cfgdesc>
[ONE CLICK CONFIGURATION]
shortdesc = One click predefined configurations
control = config
item = Default Values:0000000002
item = Wildcats Config (saves me time):#00:01#01:01#04:01
[ADS/SCOPE AND SHOOT BUTTONS]
shortdesc = Select the buttons that you are using for ADS/SCOPE and SHOOT buttons
byteoffset = 0
bitsize = 8
control = radiobox
default = 0
item = L2 / R2 or LT / RT
item = L1 / R1 or LB / RB
[TACTICAL AND MELEE BUTTONS]
shortdesc = Select the buttons that you are using for MELEE and Crouch/Prone
byteoffset = 1
bitsize = 8
control = radiobox
default = 0
item = DEFAULT: R3 / RS for MELEE and Circle / B for Crouch/Prone
item = TACTICAL: R3 / RS for Crouch/Prone and Circle / B for MELEE
[LOOK INVERSION ]
byteoffset = 4
bitsize = 1
bitoffset = 1
control = checkbox
default = 0
item = Check this box if you are using LOOK INVERSION in the game settings
</cfgdesc>
***************************************************************************** */
main
{
}
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: One Click - Checkbox Enabled (1)
I don't understand your post. I see that you changed the "Default Values". My issue is getting the LOOK INVERSION checkbox to be enabled with the one click.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: One Click - Checkbox Enabled (1)
One way to do it without having to think about it:
Open the IC via the gear like icon / using as normal.
check all the boxes/set all the value you want.
Click OK
reopen the IC.
click the icon in the IC title "Copy Configuration" paste the code into your preset and remove the "GIVICFG:" part of this string.
Or use the "IC Bytetable" tool (windows only, I am rewriting it atm using qt to support other OS too), load the script file and set the value there, hit "Export" and it will create a minimzed string only containing the values set. Paste the string into your preset, again removing the "GIVICFG:" part of it
This works as you have set your checkbox to bitoffset 1 (the first usable bitoffset is 0):
Here it is with bitoffset 0:
Open the IC via the gear like icon / using as normal.
check all the boxes/set all the value you want.
Click OK
reopen the IC.
click the icon in the IC title "Copy Configuration" paste the code into your preset and remove the "GIVICFG:" part of this string.
Or use the "IC Bytetable" tool (windows only, I am rewriting it atm using qt to support other OS too), load the script file and set the value there, hit "Export" and it will create a minimzed string only containing the values set. Paste the string into your preset, again removing the "GIVICFG:" part of it
This works as you have set your checkbox to bitoffset 1 (the first usable bitoffset is 0):
- Code: Select all
item = Wildcats Config (saves me time):#00:01#01:01#04:02
Here it is with bitoffset 0:
- Code: Select all
/* <cfgdesc>
[ONE CLICK CONFIGURATION]
shortdesc = One click predefined configurations
control = config
item = Default Values:8002050028FF9C028F0078FF6A
item = Wildcats Config (saves me time):#00:01#01:01#04:01
[ADS/SCOPE AND SHOOT BUTTONS]
shortdesc = Select the buttons that you are using for ADS/SCOPE and SHOOT buttons
byteoffset = 0
bitsize = 8
control = radiobox
default = 0
item = L2 / R2 or LT / RT
item = L1 / R1 or LB / RB
[TACTICAL AND MELEE BUTTONS]
shortdesc = Select the buttons that you are using for MELEE and Crouch/Prone
byteoffset = 1
bitsize = 8
control = radiobox
default = 0
item = DEFAULT: R3 / RS for MELEE and Circle / B for Crouch/Prone
item = TACTICAL: R3 / RS for Crouch/Prone and Circle / B for MELEE
[LOOK INVERSION ]
byteoffset = 4
bitsize = 1
bitoffset = 0
control = checkbox
default = 0
item = Check this box if you are using LOOK INVERSION in the game settings
</cfgdesc>
*/
main {
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: One Click - Checkbox Enabled (1)
lol I was going off of checkbox that you couldn't get on! So I checked and save in one click. Ok Scachi got you all good to go!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: One Click - Checkbox Enabled (1)
Thank you. The copy configuration is a better choice. This way I can configure it with other options in the future.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: One Click - Checkbox Enabled (1)
UK_Wildcats_Fans wrote:I use #04:00 to disable (0). I have been using #04:01 to enable (1). I have tried 1, 11, 10 and none seem to help.
#04:FF is how i do when using only 1 bit.
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3251
- Joined: Sun Dec 16, 2012 1:43 pm
Re: One Click - Checkbox Enabled (1)
prototype wrote:UK_Wildcats_Fans wrote:I use #04:00 to disable (0). I have been using #04:01 to enable (1). I have tried 1, 11, 10 and none seem to help.
#04:FF is how i do when using only 1 bit.
#04:01 didn't work because of the checkbox using bitoffset 1. For this #04:02 would have worked.
As prototype said, when only using 1 bit you can use FF. The bitoffset the checkbox is using doesn't matter then.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: One Click - Checkbox Enabled (1)
Or #04:55 to have 4 bits enabled and 4 bits disabled (hex to bin: 55 = 01010101).
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3251
- Joined: Sun Dec 16, 2012 1:43 pm
Re: One Click - Checkbox Enabled (1)
Thank you. I was completely missing the binary to hex conversion, which was the whole key. I created the attached Excel worksheet to help people figure out the hex value based upon specific bit values.
I developed and published a Checkbox with bit offset example script.
I developed and published a Checkbox with bit offset example script.
- Attachments
-
- Binary to Hex worksheet.xlsx
- (12.54 KiB) Downloaded 55 times
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
17 posts
• Page 1 of 2 • 1, 2
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 104 guests