Joe_La_Bricole
Member
Hello !
I would like to declare a function in a script and then assign this funtion to a variable in a struct to call that function. Is that possible and if yes how ?
Here is a little example :
Of course that way "msg" gets the output of the function but doesn't become the function.
Any idea ?
Thanks
I would like to declare a function in a script and then assign this funtion to a variable in a struct to call that function. Is that possible and if yes how ?
Here is a little example :
GML:
function message() {
show_debug_message("this is a message");
}
function struct_with_message() constructor {
msg = message();
}
Any idea ?
Thanks