So ive given this a read

Gtuner IV general support. Operation, questions, updates, feature request.

Re: So ive given this a read

Postby Scachi » Fri Jul 13, 2018 8:28 am

Buffy wrote:
Scachi wrote:A bit off topic:
Where can I get more information about that macro stuff - What terms can I search with google for ?


Seems to be a regular macro in C

Thank you very much :smile0517:
User avatar
Scachi
Major
Major
 
Posts: 989
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: So ive given this a read

Postby GamingScene » Fri Jul 13, 2018 9:48 am

J2Kbr wrote:Not sure if the led_set() in the above script will interfere with the color LED you already have, there is a chance that will, to be sure I would need to see your script.

The Titan Two GPC offer rand() function that can be used in the wait times of combos, like this:
Code: Select all
wait(10 + (uint16)(rand()*10.0));
In this example the wait time will be a random number between 10 and 20.

To make easy you can define a macro:
Code: Select all
#define rand_wait(a, b)     wait(a + (uint16)(rand()*(fix32)(b-a)))
This macro will generate a random wait time between the the first and second parameter, example of use:
Code: Select all
rand_wait(40, 120);
random wait between 40 and 120 milliseconds.


Sent you the script
User avatar
GamingScene
First Sergeant
First Sergeant
 
Posts: 48
Joined: Sat May 26, 2018 6:17 pm

Re: So ive given this a read

Postby GamingScene » Fri Jul 13, 2018 10:26 am

J2Kbr wrote:Not sure if the led_set() in the above script will interfere with the color LED you already have, there is a chance that will, to be sure I would need to see your script.

The Titan Two GPC offer rand() function that can be used in the wait times of combos, like this:
Code: Select all
wait(10 + (uint16)(rand()*10.0));
In this example the wait time will be a random number between 10 and 20.

To make easy you can define a macro:
Code: Select all
#define rand_wait(a, b)     wait(a + (uint16)(rand()*(fix32)(b-a)))
This macro will generate a random wait time between the the first and second parameter, example of use:
Code: Select all
rand_wait(40, 120);
random wait between 40 and 120 milliseconds.


Ok so ive tried the
Code: Select all
rand_wait(40, 120); and it seems to stop my scripts from working
User avatar
GamingScene
First Sergeant
First Sergeant
 
Posts: 48
Joined: Sat May 26, 2018 6:17 pm

Re: So ive given this a read

Postby GamingScene » Fri Jul 13, 2018 12:14 pm

GamingScene wrote:
J2Kbr wrote:Not sure if the led_set() in the above script will interfere with the color LED you already have, there is a chance that will, to be sure I would need to see your script.

The Titan Two GPC offer rand() function that can be used in the wait times of combos, like this:
Code: Select all
wait(10 + (uint16)(rand()*10.0));
In this example the wait time will be a random number between 10 and 20.

To make easy you can define a macro:
Code: Select all
#define rand_wait(a, b)     wait(a + (uint16)(rand()*(fix32)(b-a)))
This macro will generate a random wait time between the the first and second parameter, example of use:
Code: Select all
rand_wait(40, 120);
random wait between 40 and 120 milliseconds.


Ok so ive tried the
Code: Select all
rand_wait(40, 120); and it seems to stop my scripts from working

This works now but if you could still take a look at the Google circle led interfering with my other LEDs that would be great
User avatar
GamingScene
First Sergeant
First Sergeant
 
Posts: 48
Joined: Sat May 26, 2018 6:17 pm

Re: So ive given this a read

Postby GamingScene » Sat Jul 14, 2018 8:14 am

J2Kbr you don't need to do anything I've got the circle toggle to work but it doesn't work as I wanted because it enables when canceling things or backing out the map or menus etc so don't bother but thanks for the random values thing
User avatar
GamingScene
First Sergeant
First Sergeant
 
Posts: 48
Joined: Sat May 26, 2018 6:17 pm

Re: So ive given this a read

Postby J2Kbr » Sun Jul 15, 2018 12:23 pm

you are welcome, needing any further help don't hesitate to ask. :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 15151
Joined: Tue Mar 18, 2014 1:39 pm

Previous

Return to Gtuner IV Support (Titan Two)

Who is online

Users browsing this forum: No registered users and 3 guests