User Created Functions
main {
if(get_val(PS4_CROSS)) { // if PS4 Cross is held
if(myfunction(10, 20) == 30) { // if myfunction returns a value of 30
combo_run(mycombo); // run combo mycombo
} else if(myfunction(10, 20) == 10) { // if myfunction returns a value of 10
combo_stop(mycombo); // stop mycombo if it is running
}
}
}
combo mycombo {
set_val(PS4_TRIANGLE, 100);
wait(1000);
wait(1000);
}
function myfunction(_1stvalue, _2ndvalue) { // myfunction start
if(get_val(PS4_CIRCLE)) { // if PS4 Circle is held
return _1stvalue + _2ndvalue; // return _1stvalue plus _2ndvalue
}
return _1stvalue - _2ndvalue; // return _1stvalue minus _2ndvalue
}Calling a Function
Function Name and Declaration
Syntax
Parameters
Parameter
Description
Function Parameters
Returning from a Function
Putting it All Together
Last updated

