-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't Want Random Effects #1
Comments
You can just rewrite the shuffle function, just fill-up the array with your
favorite sequence in any order.
17 Фев 2017 г. 18:21 пользователь "LedArts" <notifications@github.com>
написал:
… hello sir, i try this program but i don't want to run random effects every
time. i want to serial wise effects as i write in program. Can u please
stop the shuffle or random function. n give me serial wise code.
thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASVrH0eTp7TsqDDMYVVMUQoahot7IYBxks5rdbsSgaJpZM4MEY-X>
.
|
sir can u give me any example how to write it.... |
Hello!
byte shuffle::next(void) {
if (curr >= num_anim) curr = 0;
return index[curr++];
}
… sir can u give me any example how to write it....
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASVrH7ff1oDUye-QrO4R0cc0RWJoMa7Wks5rdc1hgaJpZM4MEY-X>.
|
thank you so much sir byte shuffle::next(void) { |
This function is no longer used in this case. You can delete it
completely if you wish.
If it is not obvious, i can explain how it works. To ensure that all the
sequences are run in a turn, i swap two sequences in the array in the
randomize function.
…
thank you so much sir
i try it and no error occur. but i have one more question in "void
shuffle::randomize(void)" there is any change in this function or it
will be as it is.
byte shuffle::next(void) {
if (curr >= num_anim) curr = 0;
return index[curr++];
}
void shuffle::randomize(void) {
for (byte i = 0; i < num_anim*2; ++i) {
byte p1 = random(num_anim);
byte p2 = random(num_anim);
if (p1 != p2) {
byte t = index[p2];
index[p2] = index[p1];
index[p1] = t;
}
}
curr = 0;
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASVrH9jRlumT6hiqABN8ZW0QFVdAXyziks5rddisgaJpZM4MEY-X>.
|
thanxxxxxxxxxxxxxxxxxxxxxx lot sir....... |
hello sir, i try this program but i don't want to run random effects every time. i want to serial wise effects as i write in program. Can u please stop the shuffle or random function. n give me serial wise code.
thank you
The text was updated successfully, but these errors were encountered: