So ive given this a read
16 posts
• Page 2 of 2 • 1, 2
Re: So ive given this a read
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
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: So ive given this a read
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:In this example the wait time will be a random number between 10 and 20.
- Code: Select all
wait(10 + (uint16)(rand()*10.0));
To make easy you can define a macro:This macro will generate a random wait time between the the first and second parameter, example of use:
- Code: Select all
#define rand_wait(a, b) wait(a + (uint16)(rand()*(fix32)(b-a)))
random wait between 40 and 120 milliseconds.
- Code: Select all
rand_wait(40, 120);
Sent you the script
-
GamingScene - Sergeant Major
- Posts: 104
- Joined: Sat May 26, 2018 6:17 pm
Re: So ive given this a read
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:In this example the wait time will be a random number between 10 and 20.
- Code: Select all
wait(10 + (uint16)(rand()*10.0));
To make easy you can define a macro:This macro will generate a random wait time between the the first and second parameter, example of use:
- Code: Select all
#define rand_wait(a, b) wait(a + (uint16)(rand()*(fix32)(b-a)))
random wait between 40 and 120 milliseconds.
- Code: Select all
rand_wait(40, 120);
Ok so ive tried the
- Code: Select all
rand_wait(40, 120); and it seems to stop my scripts from working
-
GamingScene - Sergeant Major
- Posts: 104
- Joined: Sat May 26, 2018 6:17 pm
Re: So ive given this a read
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:In this example the wait time will be a random number between 10 and 20.
- Code: Select all
wait(10 + (uint16)(rand()*10.0));
To make easy you can define a macro:This macro will generate a random wait time between the the first and second parameter, example of use:
- Code: Select all
#define rand_wait(a, b) wait(a + (uint16)(rand()*(fix32)(b-a)))
random wait between 40 and 120 milliseconds.
- Code: Select all
rand_wait(40, 120);
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
-
GamingScene - Sergeant Major
- Posts: 104
- Joined: Sat May 26, 2018 6:17 pm
Re: So ive given this a read
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
-
GamingScene - Sergeant Major
- Posts: 104
- Joined: Sat May 26, 2018 6:17 pm
Re: So ive given this a read
you are welcome, needing any further help don't hesitate to ask.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
16 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 119 guests