Function for setting a function pointer for Affector