var t = time / maxtime; var func = lerp; if (iscolor) func = merge_color; if (i_ex(target)) { if (init == 0) { if (is_string(pointa)) pointa = variable_instance_get(target, varname); channel = animcurve_get_channel(animcurve, channelname); init = 1; } var cont = 1; if (respectglobalinteract == true) { if (global.interact != 0) cont = 0; } if (cont) time++; variable_instance_set(target, varname, func(pointa, pointb, animcurve_channel_evaluate(channel, time / maxtime))); if (time >= maxtime) { if (loop && loopcount != 0) { if (loopcount > 0) loop--; time -= maxtime; } else { instance_destroy(); } } } else { instance_destroy(); }