The sum of its inputs

Finally the system for handling inputs is complete, the reason i didn’t post yesterday is because i spent all day getting to a point where i could test the function for comparing two integer arrays to each other. (actually checking if the first array contains the second at some part) However, when testing to make sure the function worked as it should i kept getting an error claiming that the variables were out of scope. Out of scope

After several hours of searching for a way to solve the issue during which i went through the function properly and double checked all the logic i eventually tried changing it from a macro to a function which solved the issue. The reason for this i am still not sure of. In either case, my function works and can now accurately check if one array contains another. I won’t go into complete detail since the function is a bit hard to scope without multiple closeups but basically it runs through the first array comparing each node to the first of the second array. If a node is equal it goes into another loop where the following nodes in each list are compared to each other, if any corresponding nodes are not equal the function is broken and it returns to the first loop which is then resumed. In the end the function returns true or false. It is then used in the function which compares the player’s inputs to the list of known spells.

Each spell class which was included in the library we purchased has been modified to include an array of integers which represent the required stick inputs. The function that compares the stick path created in the methods described in my previous posts to the arrays of integers in the list of available spells is a bit less complex, it simply loops through the list of spells and compared their Combination array to the stick path. In this case this is the right stick but the left stick is essentially identical.

Right stick input

The only thing missing right now is a way to distinguish each spell regarding what stick is used to perform that spell in particular. we are thinking of ways to do this without needing too much variables in the spell class which won’t be used for regular spells.