Need your wizard help I been trying for a while now to figure how

Need your wizard help I been trying for a while now to figure how to add 2 arrays of animations. Been using as a base the great example “demo real with button “ . Basically I want to have a push button when is push it plays the animations of array 1 and when is not push ( default ) plays anitaions of array 2
Any advice is extremely welcome
Link to what I am using as base

On line 158 change wasPressed to isPressed. And you’ll need a variable to store if the button is pressed or not. You could use a Boolean:
bool buttonPressed = false;

Set this Boolean true or false as needed in the readButton function.

In the main loop you’ll need an If check for that Boolean which can then determine which of your two animations to display.

if (buttonPressed) {
//Do stuff
} else {
//Do other stuff
}

Post your updated code to http://gist.github.com and share the link here as you run into more questions.

Just remembered I have this example that is similar to what you’re wanting to do.