Error Question
35 posts
• Page 4 of 4 • 1, 2, 3, 4
Re: Error Question
Cool. Glad to see a comment in favor of FFB prefix! I liked it as well. It is simple and short, like the LED prefix.
Each FFB have two parameters: force and duration. The force feedback "signal" from steering wheels can be converted to this same parameters.
Each FFB have two parameters: force and duration. The force feedback "signal" from steering wheels can be converted to this same parameters.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Error Question
OK like that with two parameters it's perfect.
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: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Error Question
J2Kbr wrote:set_val is the only IO function that accepts fix32 and int as values. If an int is provided, it internally converts to fix32. I did this to make easy use int values to set the outputs without use type cast, or be forced to use 32bits variables where it is not needed.
Could you please elaborate on this, for someone who is not a programmer?
Does that mean set_val is the only one that accepts values like this:
- Code: Select all
set_val(button, 100)
While every other function requires you to cast it first, like this:
- Code: Select all
if((int) get_val(BUTTON)) > 100)
Also in what scenarios would I use fix32 vs. int? Is it just a matter of more precision?
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
Re: Error Question
You are correct in your examples. And also on the scenarios, a int -100 to 100 has "only" 200 points of resolution, on the other hand, a fix32 -in the same range- have 13,333,333 points of resolution. For regular buttons this should not make any difference, but in case of mouse translation the extra resolution will have a significant positive impact.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Error Question
thanks for clarifying!
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
35 posts
• Page 4 of 4 • 1, 2, 3, 4
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 140 guests