I solved this myself by creating a variable that changes in each function. This var is set to a letter in function a() and if it is that letter when I click on function c() then it changes into another letter and so on. Lastly I have a if statement that activates if it is the right last letter.
I have a project where I have several functions and I want another function to activate if the first 4 functions is activated in a particular order. (and then I want several else if statements to get different functions to activate for other orders, but that I can figure out myself)
I don't know how to get javascript acknowledge that a chain of functions are activated in the right order. (if that is even possible)
as an example: I have function a(), function b(), function c() and function d().
if they are activated in order acbd I want function s() to activate. and if they are activated in order bdca I want function f() to activate.