Page 2 of 2

Re: So ive given this a read

PostPosted: Fri Jul 13, 2018 8:28 am
by Scachi
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:

Re: So ive given this a read

PostPosted: Fri Jul 13, 2018 9:48 am
by GamingScene
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

Re: So ive given this a read

PostPosted: Fri Jul 13, 2018 10:26 am
by GamingScene
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

Re: So ive given this a read

PostPosted: Fri Jul 13, 2018 12:14 pm
by GamingScene
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

Re: So ive given this a read

PostPosted: Sat Jul 14, 2018 8:14 am
by GamingScene
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

Re: So ive given this a read

PostPosted: Sun Jul 15, 2018 12:23 pm
by J2Kbr
you are welcome, needing any further help don't hesitate to ask. :smile0517: