function() : boolean{ return(a value here)}
in this function by typing in after the () the boolean am i telling it to run this function and return a true or false?
You got it right but you typed it wrong.
I mean that you need to use the 101010 button to design your question.So:
function theName(param:paramType):returnType{
//the implementation
return valueOfReturnType;
}
Yes that’s correct. You can also pass in variables to it if needed:
//An unnecessary bool shifter
function ReturnBool (someValue : int) : boolean {
var returnBool : boolean;
for (var i : int = 0; i < someValue; i++) {
returnBool = !returnBool;
}
return returnBool;
}
You’d reference to it with aBoolean = ReturnBool(someInt); or if (ReturnBool(someInt)) {}